I have a funtion that creates an explosion at a specified location wen called with explode(od(c,2),od(c,3),od(c,4),od(c,2),od(c,3),od(c,4),c)
(c is the object number, od(c,2),od(c,3),od(c,4) are the x, y and z locations. The code for the function is
function explode(xpo#,ypo#,zpo#,xl#,yl#,zl#,obj)
`position sound
position sound 200,xpo#,ypo#,zpo#
`position listener
position listener xl#,yl#,zl#
`position and rotate particles
for m=54999 to 59999
position object m,zpo#,ypo#,zpo#
rotate object m,rnd(360),rnd(360),rnd(360)
next m
`synchronize
sync
`play sound
play sound 200
`startexplosion
hide object obj
for m=0 to 500
for p=54999 to 59999
move object p,5
next p
sync
next m
`clean up
for m=54999 to 59999
position object m,99999,99999,99999
next m
endfunction
The media is attached.
If you wish to try it you need this at the top of your code
`Load explosive particles
`load texture
load image "fire.bmp",200
`make and texture particles
for m= 54999 to 59999
make object plain m,0.5,0.5
texture object m,200
`make particles only show flame
set object m,1,0,1
`position particles
position object m,99999,99999,99999
next m
`load explosion noise
load 3dsound "explode.wav",200
When it try to compile i get 'Syntax error. Parameters differ between function call and declaration'. The strage thing is it only happens in this one function.
Any ideas?
Give in, NEVER