P
peanutbuuter
Guest
i was making a top down shooter, and in a draw gui event i have this code:
global.hp = 10
global.max_hp = 10
health = global.hp/global.max_hp*100
draw_healthbar(608, 0, 640, 96, health, c_black, c_red, c_green, 3, true, false)
and in the collision with enemy bullet i had this:
global.hp = global.hp - 1;
if global.hp == 0{
instance_destroy()
}
but now the bullets just pass through the player
any help will be appreciated!
global.hp = 10
global.max_hp = 10
health = global.hp/global.max_hp*100
draw_healthbar(608, 0, 640, 96, health, c_black, c_red, c_green, 3, true, false)
and in the collision with enemy bullet i had this:
global.hp = global.hp - 1;
if global.hp == 0{
instance_destroy()
}
but now the bullets just pass through the player
any help will be appreciated!