/* if(result > 5) //if from my pos to temp is greater than 5
{ move_var.z -= gravidade; }*/ //fall speed of 20 (higher number, faster falling speed)
Why is this commented out?
Try changing the following into the blue code below.
/* if(result > 5) //if from my pos to temp is greater than 5
{ move_var.z -= gravidade; }*/ //fall speed of 20 (higher number, faster falling speed)
if(result > 100) { show_health -= 1; wait(1);}
if(result <= 0) //if from my pos to temp is less than or equal to 0
{ move_var.z += 2; } //not touching the floor but extremely close
if(result > 5) //if from my pos to temp is greater than 5
{ move_var.z = -5; } //fall speed of 20 (higher number, faster falling speed)
//if(result > 100) { show_health -= 1; wait(1);}
if(result < 5) //if from my pos to temp is less than or equal to 0
{ move_var.z = -result; } //not touching the floor but extremely close
Hope it works.
Whats the "if(result > 100) { show_health -= 1; wait(1);}" for? Why "wait(1);" after it?