D
daddysucc5000
Guest
I'm new to game maker and I'm making a top-down shooter similar to Hotline Miami. Right now I have an enemy and a player and when the player shoots and the bullet collides with the enemy the object changes to the dead body object.
My problem is that the dead body sprite doesn't face the correct way where the bullet came from.
I want it to be like in Hotline Miami where the dead body faces where the bullet came from if that makes sense.
My dead body object is called oDeath and my enemy object is called oEnemy
Sorry for bad English.
My code right now is:
Enemy collsion event with bullet:
Create Event in oDeath
My problem is that the dead body sprite doesn't face the correct way where the bullet came from.
I want it to be like in Hotline Miami where the dead body faces where the bullet came from if that makes sense.
My dead body object is called oDeath and my enemy object is called oEnemy
Sorry for bad English.
My code right now is:
Enemy collsion event with bullet:
Code:
instance_destroy();
instance_create_layer(x,y,"Dead",oDeath);
instance_create_layer(x,y,"Blood",oBlood);
instance_create_layer(x,y+25,"Blood",oBlood2);
Code:
direction = (-oPlayer.image_angle);
image_angle = direction;