Artie_Kyle
Member
What up, GMC,
Made a bullet sprite, and I've been trying to make it so that the first image is the muzzle animation firing, then the second one is the projectile and it stops animating when it's fired and headed towards something.
After impact, I'm trying to get it to animate again and basically dissolve and destrot itself once the animation ends, but I can't get the sprite to animate again after stopping.
Here's the code:
Whatever it is I'm missing, feel free to correct me. As always, thanks for your time, guys!
Made a bullet sprite, and I've been trying to make it so that the first image is the muzzle animation firing, then the second one is the projectile and it stops animating when it's fired and headed towards something.
After impact, I'm trying to get it to animate again and basically dissolve and destrot itself once the animation ends, but I can't get the sprite to animate again after stopping.
Here's the code:
Code:
// create event
image_speed = 1;
// step event
if image_index > 0 and !place_meeting(x, y, obj_wall)
or image_index > 0 and !place_meeting(x, y, obj_all_parent) {
image_speed = 0;
image_index = 1;
}
// collision event
image_speed = 1;
//animation end event
instance_destroy();