HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Do X,Y coordinates work like this

07-10-2008, 07:13 PM#1
crayz
Trigger:
(X of (Position of (Dying unit))) Less than or equal to ((X of (Position of (Picked unit))) + 2000.00)
(Y of (Position of (Dying unit))) Less than or equal to ((Y of (Position of (Picked unit))) + 2000.00)

These are my conditions. I was wondering if X & Y coordinates are straight up & down, and straight left & right, or would these conditions work, even if the Picked unit is diagonally within 2000 of the Dying unit.

Any suggestions?
Thanks!
07-10-2008, 07:21 PM#2
the-thingy
Quote:
These are my conditions. I was wondering if X & Y coordinates are straight up & down, and straight left & right, or would these conditions work, even if the Picked unit is diagonally within 2000 of the Dying unit.

It would be able to go anywhere down-left of the unit, but it would be limited going in any other general direction.

You can go up to 2000 distance if you go EXACTLY up or right. If you aren't going exactly up or right, you should be able to reach any point in a general up-right direction
07-10-2008, 07:29 PM#3
crayz
Oh, I see.
Wouldn't my conditions go up & right? I thought down & left were the negative values on an xy graph.

Well, are there any conditions to check whether a unit, such as Picked unit, is within range 2000 from Dying unit, able to reach in every direction?

I'll continue to look for it, maybe someone will post the condition before I find it :)

Thanks.

Edit: I remembered seeing a 'Pick all units within range' unit group, and sure enough, I've come up with a new algorithm using this function.
Thanks!
07-10-2008, 07:44 PM#4
the-thingy
Quote:
Wouldn't my conditions go up & right? I thought down & left were the negative values on an xy graph.

They are, but look at your conditions. You are checking if your units position is less than/equal to PosX + 2000, PosY + 2000.

Let's say the unit is at (-2000, -2000)

You are checking if (-2000, -2000) is less than (-2000+2000, -2000+2000) <this equates to (0, 0)>

And the unit's position (-2000, -2000) is certainly a negative value :)