Hola a todos, me llamo Javi y estoy teniendo un pequeño problema con un script, concretamente con un if, adjunto una imagen.
Probablemente sea uno de mis grandes fallos tontos, pero ahí mismo lo teneis.
Probablemente sea uno de mis grandes fallos tontos, pero ahí mismo lo teneis.
(inserto también el script)
var curHealth : int = 100;
var maxHealth : int = 100;
var healthtext : GUIText;
var regenActive;
var isNotDead=true;
function Update () {
healthtext.text = curHealth + "%";
if(curHealth < ) {
curHealth = ;
}
if(curHealth > 100) {
curHealth = 100;
}
if(Input.GetKeyDown("e")) {
curHealth -= 10;
}
}
function OnTriggerEnter(other : Collider){
if (other.tag == "DeadZone"){
curHealth -= 500;
isNotDead= false;}
if (curHealth < 100 || (other.tag == "PickHealth")){
curHealth += 50;}
if (other.tag == "Fire"){
curHealth -= 10;}
}
function Start () {
if isNotDead=false; {
Destroy(gameObject);
}
}