C
crazybloodmonkey
Guest
so i have been having problem with my character's health and dying animation i got the health to work but every time i got hit by the bullet it would the dying animation so it was like i was dying three time before i actually died. someone told make state machines in my step event and i tried that but it didn't really work so maybe someone could show me what i did wrong or what i should do.
obj_player
then in obj_ebullet there a collison with object player and this coded in it
code:
obj_player.hp -= 1
obj_player
Code:
switch (state) {
case state.death:
{
if hp <= 0 = state = state.death
instance_change(obj_death,true)
instance_destroy()
}}
then in obj_ebullet there a collison with object player and this coded in it
code:
obj_player.hp -= 1