| 01-27-2008, 02:31 AM | #1 |
I'm trying to check if a unit is # units away from another unit. JASS:SquareRoot( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) ) < 10 Heres what I'm using to move a unit JASS:call SetUnitPosition( a, x1+5 *Cos(f * bj_DEGTORAD), y1+5 *Sin(f * bj_DEGTORAD) ) What are you supposed to do? Are they both bad? Alternatives? |
| 01-27-2008, 02:45 AM | #2 |
You should use this native instead : JASS:constant native IsUnitInRange takes unit whichUnit, unit otherUnit, real distance returns boolean |
| 01-27-2008, 03:06 AM | #3 |
Strange, I don't ever remember repping you, but it seems i have...Need to spread it more :( Ty btw. |
