Timing for enemy death animation [SOLVED]

M

Marin

Guest
So I made this death sprite and I already have it set that an enemy dies on a certain score point...

if (global.score mod 15 == 0)
{
var o;
o = instance_create(x,y,obj_deadenemy);

Now i'm not sure what to do, because I want to destroy that "deadenemy_sprite" too but not sure how to do that, because if I but instance_destroy at the end its just going to destroy the main enemy and not the death sprite, what to do?
Thanks!
 

Genetix

Member
In obj_deadenemy why not give not say instance_destroy() in the Animation End event - or when created set an alarm, and destroy itself when the alarm goes off?
 
Top