Please Help!

A

Amoses

Guest
So Im making it to when my player is killed its supposed to destroy the instance, and then go to the next room, but im watching the hp reach 0 viewing the healthbar, and nothing is happening am i doing something wrong?
Code:
 if hp = 0 
instance_destroy()
room_goto(Death)
 

Sabnock

Member
try

Code:
if (hp == 0) {
instance_destroy();
room_goto(Death);
}
although with your code the instance would instantly be destroyed and move to the next room so is the is the code even being run?
 
A

Amoses

Guest
try

Code:
if (hp == 0) {
instance_destroy();
room_goto(Death);
}
although with your code the instance would instantly be destroyed and move to the next room so is the is the code even being run?
im so confused, this still doesnt work, i dont know whats wrong in the first place, cause now whenever i even try to just put
Code:
 if hp = 0
instance_destroy()
that doesnt even work, idk whats wrong i have
Code:
 CREATE EVENT: global.hp = 100
hp = global.hp
 

Sabnock

Member
As I say. It looks like the code isn't being run. Is it in the step event, is there an instance of the object in the room, is the if statement nested in another if statement?
 
Top