#How to make an action get canceled if the result of the math operation on a variable = negative numb

1 messages · Page 1 of 1 (latest)

rigid gulch
#

When action is executed it takes off a number of the variable so if the action takes off 10 and the variable is 5 which makes a negative number, how do i cancel the action, Im not good at explaining it, english isnt my first language

steel quest
#

From what I understood from the thing you wrote, when the action happens it will do a thing(current var=5, it deals 10 to the var, and gets -5) that will verify if the number is negative, if it is, it will cancel.

#

So all you have to do is after reducing that var, verify if the var ≥ 0, if it is, it will continue, if not (var < 0), it will exit script (aka it won't execute, idk how's your script lol)