VentKazemaru
Member
I have an item that functions has heart pieces in zelda, collect 2 and the player's health increases. I've created the item, but returning to the room after going to another respawns them.
I have the object destroys itself when
global.heartcontainer1=true
But then I need to flag each heart container to trigger that global variable.
I tried giving the giving the global variable, a normal variable that should be able to be adjusted in the creation code. but I don't seem to understand it.
heart piece
the heart pieces do self destruct properly if I change the global variables manually. but I can't figure it out how to trigger it from collecting the item.
I have the object destroys itself when
global.heartcontainer1=true
But then I need to flag each heart container to trigger that global variable.
I tried giving the giving the global variable, a normal variable that should be able to be adjusted in the creation code. but I don't seem to understand it.
heart piece
Code:
//create event
despawn=0 //global.heart1
//colision event
despawn=true
//heartpiece creation code
if global.heart1=true{
instance_destroy()}