• 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!

Legacy GM make sprite play once on contact, then go back to orignal sprite

E

EZTALES

Guest
hey yall,
so im making a game and watch game and what i trying to do is when the player comes in contact with the enemy, the player does a quick animation and then they revert back to there old animation. Ive been trying this with drag and drop and cant figure it out.
any help would be great,
EZ
code:
obj_lion
Collision Event with object obj_player_new:
for other object: set the sprite to spr_player_L_fire with subimage 0 and speed 1
destroy the instance
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Use the Animation End event, which can be found in the "Other" event category. This event will trigger everytime the assigned sprite animation ends. In this event, do an "If" check to see what the sprite triggering the event is, and if it's the "fire" sprite, then set the sprite back to the original one again.
 
Top