
-----------------------------------
Impatientcow915
Fri May 15, 2015 7:49 am

If command help
-----------------------------------
Can you do this
      If x < ( or >) y by 5

-----------------------------------
Dreadnought
Fri May 15, 2015 9:02 am

Re: If command help
-----------------------------------
What exactly do you expect the behavior to be?

My best guess is is that you want to do something for each of x, x+5, x+10, ... if they are less/greater than y? In that case you would need a [tdoc]for[/tdoc] loop and an if statement within it.

-----------------------------------
DemonWasp
Fri May 15, 2015 12:09 pm

RE:If command help
-----------------------------------
It seems like you want to check whether X and Y are more than 5 (units?) apart.

So you want to check whether the difference between X and Y has a magnitude of more than 5.

You can find the difference between numbers by subtraction.

You can find the magnitude of a number with the abs(x) function.
