var dead:boolean=false;
function Update (){
if(Health.health==0){
dead=true;
}
}
if(dead==true){
print(“You are dead”); //never works
}
if(dead==false){
print(“You are not dead”); //consistently works
}
The game will return the “You are not dead” message when the variable is false, but will not return “You are dead” when the variable is true. Why is the script only working for the value false? If I reverse the two and for example make a variable “alive” that is true when health is not 0, it still does not return anything upon death. Any help? I can elaborate if there’s any necessary information I’ve left out.