I have this just before my main loop.
REM ** Create particle explosion
ExplosionOneOn = 0
ExplosionForBricksOne = 10
explImage = LoadImage ( "shrapnel3.png" )
CreateParticles(ExplosionForBricksOne, -100, -100 )
And on keypress I do this.
REM ** Explosion
if ExplosionOneOn = 0
createExplosionOne(100,100)
endif
This is my createExplosionOne function.
Function createExplosionOne(xpos, ypos)
SetParticlesPosition(ExplosionForBricksOne, xpos, ypos )
ResetParticleCount ( ExplosionForBricksOne )
SetParticlesFrequency ( ExplosionForBricksOne, 250 )
SetParticlesLife ( ExplosionForBricksOne, 1.0 )
SetParticlesSize ( ExplosionForBricksOne, 32 )
SetParticlesStartZone ( ExplosionForBricksOne, xpos, ypos, xpos+50, ypos+50 )
SetParticlesImage ( ExplosionForBricksOne, explImage )
SetParticlesDirection ( ExplosionForBricksOne, xpos, ypos )
SetParticlesAngle ( ExplosionForBricksOne, 360 )
SetParticlesVelocityRange ( ExplosionForBricksOne, 0.8, 2.5 )
SetParticlesMax ( ExplosionForBricksOne, 250 )
AddParticlesColorKeyFrame ( ExplosionForBricksOne, 0.0, 0, 0, 0, 0 )
AddParticlesColorKeyFrame ( ExplosionForBrickOne, 0.5, 255, 255, 0, 255 )
AddParticlesColorKeyFrame ( ExplosionForBricksOne, 2.8, 255, 0, 0, 0 )
AddParticlesForce ( ExplosionForBricksOne, 2.0, 2.8, 25, -25 )
ExplosionOneOn = 1
Endfunction
And inside my main loop I have this.
if ( GetParticlesMaxReached ( ExplosionForBricksOne ) )
ExplosionOneOn = 0
endif
I get this error: