# Need help on Do -> until

## Recommended Posts

yeap

i have number X and Y

y is 100

x is 200

my problem is

do

;Craphere

untill <-- this part

i want it to be +4 x or -4 x [x - 4 or x + 4 {or less than 4, 3 or 2 just between the 4 and X } ]

same for y

but i cant figure out way..

tell if you didnt understand some part ;o i am not good at explaining..

give me bit ideas

##### Share on other sites

You are right... you are not good at explaining.

##### Share on other sites

But perhaps you mean

```Do
; some code
Until \$z >= \$x - 4 AND \$z <= \$x + 4```
Edited by SpookMeister

##### Share on other sites

But perhaps you mean

```Do
; some code
Until \$z >= \$x - 4 AND \$z <= \$x + 4```
hmh, my head is so into other things, but that might work, ty

##### Share on other sites

hmh, my head is so into other things, but that might work, ty

err after bit thinking, it wont work

better explanation:

i got the X = 100 and y = 200

Z is the number i am looking if its inside the place where i want

not x+4 or x-4, between 96 and 104 :| now i got it right, but still looking for ideas

##### Share on other sites

Z is the number i am looking if its inside the place where i want

That is what I gave you...

Perhaps you could make an example script that shows what you are trying to do we could help more.

##### Share on other sites

That is what I gave you...

Perhaps you could make an example script that shows what you are trying to do we could help more.

i found way by thinking bit deeper ^^

answer is : pythagorean theorem.... distance = sqrt(dx^2 + dy^2)

ty for helping anyway

## Create an account

Register a new account

×

• Wiki

• Back

• Git