• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Animation

G

Gabriel1998

Guest
Hello,

Please help me, let's supose that there are object A and B , and when object A collides with object B, the object A is suposed to do an animation and the object B disapears, but what is happening is that the collison time is so little that the object A don't play the full animation or play it too fast , i don't know. What can i do?

The animation is only played in the moment that the object collides...
 

Neptune

Member
Don't have the animation playing be dependent on the collision check. Only have the "trigger" be dependent on the collision check.
Pseudo code:
Code:
if (A collides with B) && !play_animation
{
   play_animation = true;
   with(B) {instance_destroy();}
}
if play_animation
{
   execute entire animation
}
 
Top