W
Wolfrick
Guest
So I've been trying to destroy my bullet after it hits an enemy (the enemy should disappear and a short death animation will play). However, sometimes the bullet hits the enemy and the death effect will play but the enemy is still there and it can take multiple shots before the enemy disappears even though after one hit it should die. Out of 5 enemies at once this'll happen to 1 or 2 out of the 5 as the rest will get destroyed on the first hit.
obj_leftBullet_shooter [event collision w/ obj_water]
obj_water [event step]
(This is the only code in my obj_water)
*Just to be clear my enemy is called obj_water because it's a glass of water that chases you*
obj_leftBullet_shooter [event collision w/ obj_water]
Code:
///Destroy Enemy
with(other){
instance_change(obj_red_particles, true);
}
instance_destroy();
(This is the only code in my obj_water)
Code:
///Follow Player
//Call Script
scr_enemy_follow()
*Just to be clear my enemy is called obj_water because it's a glass of water that chases you*