Please can anyone help me to get the velocity of sprite so that i can apply it on its colision with other sprites
error comes when the timer becomes zero
i m doing that when the distance of 1st sprite is less than 150 to 2nd sprite reset timer and when they collide take the new time and divide 150 with timer here is the velocity but the timer becomes zero some time
do anyone have another idea
Offline
Well, it's because you're resetting once they get close, therefore, even when they are colliding, the timer will reset. Perhaps try resetting when the sprites move past the 150 distance mark, but only once.
when gf clicked forever if <(distance to [sprite 2 v]) < (150)> reset timer wait until<(distance to [sprite 2 v]) > (150)> end endThis will reset, then wait until they are at least 150 apart before being able to fire again.
Offline