Reply to Re: Brain 10 - target?
If you don't have an account, just leave the password field blank.
In case you can't use math_sqrt(), you can calculate the square of that distance and compare it to 100(if you want the distance to be <10)
To calculate the distance, do this:
&distance1 = &dinkx;
&distance1 -= &spritex;
&distance1 *= &distace1;
&distance2 = &dinky;
&distance2 -= &spritey;
&distance2 *= &distace2;
&distance1 += &distance2;
To calculate the distance, do this:
&distance1 = &dinkx;
&distance1 -= &spritex;
&distance1 *= &distace1;
&distance2 = &dinky;
&distance2 -= &spritey;
&distance2 *= &distace2;
&distance1 += &distance2;