Staredit Network

Staredit Network -> UMS Assistance -> Coordinates
Report, edit, etc...Posted by JaFF on 2007-01-11 at 06:52:05
I have a 18x9 tile arena. I'm using coordinate detection to detect the location of certain units in that arena. My coordinates unit of measurement is 1/2 tiles (for more accuracy) So I have 35x17 possible coordinates. How do I detect coordinates (for those who don't know how it's done):

You set two lines of A units as your X and Y axis. Then, you center two locations on the unit in the arena. One location is 1x100 and the second is 100x1 (if your coordinates are measured by tiles). That way, those locations contain 1-2 of A units on each axis.
user posted image

Now, detecting the coordinates if you have a unit is easy. But what if I want to create a unit (for example) at the given coordinates WITHOUT setting a grid on the arena? (because it's also easy with a grid tongue.gif )

I hope I was crear enough.
Report, edit, etc...Posted by xmrxsiegecopx on 2007-01-11 at 07:24:40
Pre-place burrowed units & use mobile grids?
Report, edit, etc...Posted by JaFF on 2007-01-11 at 07:28:12
QUOTE(JaFF @ Jan 11 2007, 02:52 PM)
WITHOUT setting a grid on the arena

The problem with the grid is that it lags if I make the arene bigger (and I really want to do that)
Report, edit, etc...Posted by Pyro-Fire on 2007-01-11 at 08:27:38
9x2 != 17.
9x2 = 18.

there is no way for detcting an x/y axis of a unit without some 3rd-party helper.
Report, edit, etc...Posted by spinesheath on 2007-01-11 at 08:35:00
You will need a bunch of locations for this. The key is that "center location" can't push a location off the map, not even partially. So it aligns with the map border. And of course if you place a unit in a location moved that way, it will still be created in the middle.
So the larger (=longer) the location is, the further you can place the unit from the map border.

If not everything is clear by now (not unlikely) try to search for some tutorial, though I don't know of any yet. Or maybe someone has the time to explain it in more detail or an example map at hand.
Report, edit, etc...Posted by JaFF on 2007-01-11 at 08:51:23
QUOTE(Pyro-Fire @ Jan 11 2007, 04:27 PM)
9x2 != 17.
9x2 = 18.

there is no way for detcting an x/y axis of a unit without some 3rd-party helper.
[right][snapback]612370[/snapback][/right]
  • I'm placing mines with the fine grid, and I don't place mines that almost leave the arena.
  • Kenoli's map and my map and I suspect there are more... Don't post if you don't know.


ADDITION:
QUOTE(spinesheath @ Jan 11 2007, 04:35 PM)
You will need a bunch of locations for this. The key is that "center location" can't push a location off the map, not even partially. So it aligns with the map border. And of course if you place a unit in a location moved that way, it will still be created in the middle.
So the larger (=longer) the location is, the further you can place the unit from the map border.

To be honest, I always though that you can move the location off the map. After reading your post I decided to test and found out that you're right. smile.gif This is a good idea, but it will take quite a fiew locations...

Any other ideas?
Report, edit, etc...Posted by Falkoner on 2007-01-11 at 09:19:49
I can see almost no way to do it without having extra locations or burrowed units. Although, I thought of this. You can have different burrowed units on the side, so each unit is either a different unit or a different player. Now you just center the 2 locations on the pair of burrowed units that make those two locations align where you want them. Would that work??
Report, edit, etc...Posted by Lord-Omega on 2007-01-11 at 10:53:13
the only way i see doing this is having locations for every possible area, then do a trig like when player brings units to X-axis 10 and to Y-axis 2, so it would take alota trigs and locs. ehh, i probly missunderstood the problem, oh well...
Report, edit, etc...Posted by Zeratul_101 on 2007-01-11 at 11:15:45
jammed, what kinda coordinate grid are you using anyhow? shmidley's grid or fishgolds(microscan)?

fishgold's will do this for you automatically, and, depending on your needs, for shmidley's, you could use a mobile grid(assuming its close enough) and jsut transfer the death counter data over while calculating for relativity.
Report, edit, etc...Posted by spinesheath on 2007-01-11 at 11:24:58
Can anyone give me some links or brief descriptions of both shimdley's and fishgolds grids? I am not familiar with any of these names Oo
Report, edit, etc...Posted by JaFF on 2007-01-11 at 12:17:10
QUOTE(Falkoner @ Jan 11 2007, 05:19 PM)
I can see almost no way to do it without having extra locations or burrowed units. Although, I thought of this. You can have different burrowed units on the side, so each unit is either a different unit or a different player. Now you just center the 2 locations on the pair of burrowed units that make those two locations align where you want them. Would that work??
[right][snapback]612382[/snapback][/right]

No. Just because two locations cross, it doesen't mean that it will work.

ADDITION:
QUOTE(Zeratul_101 @ Jan 11 2007, 07:15 PM)
jammed, what kinda coordinate grid are you using anyhow? shmidley's grid or fishgolds(microscan)? 

fishgold's will do this for you automatically, and, depending on your needs, for shmidley's, you could use a mobile grid(assuming its close enough) and jsut transfer the death counter data over while calculating for relativity.
[right][snapback]612397[/snapback][/right]

I don't know the difference and don't know how both systems work. Could you explain? smile.gif

I didn't understand a thing in the second part. sad.gif
Report, edit, etc...Posted by fritfrat(U) on 2007-01-11 at 18:02:55
I looked forever to find a post I thought really addressed this exact thing that I made, but it was actually for another purpose. You can still read what I said, though, because it still uses the same method. Also, I didn't look at the triggers, but devilesk's snake map may have possibly used something similar to this method, because he does have the many locations as I describe them.

The basic idea is to have units along the left, bottom, and top sides of the area with many 1 wide, very tall locations (long enough to butt up against the side of the map) that you center on either the top or bottom rows so that the very middle of the tall location you choose to use is right at the coordinate you want. This will require a trigger per coordinate, but a combination of trigger duplicator and wordpad with scmdraft may speed up the process greatly. I realize that I did not truly/extremely in depth describe how to implement this idea, but that would take a lot of work. I'll describe it for you if need be, but see if you can figure it out for yourself first.

http://www.staredit.net/index.php?showtopic=33068&hl=

EDIT: I actually read what I wrote back then, and I actually used very wide locations in that example back then instead of very tall locations. Same idea, though.
Report, edit, etc...Posted by Falkoner on 2007-01-12 at 17:34:30
Microscan he means like in THIS and in the other one I think he means like in THIS. Excuse me if I am wrong about the second one.

ADDITION:
You could meld me and spinesheath's ideas to make it so you can center different sized locations, and you would have the burrowed units on top and bottom of map rather than bottom and left. so you used the full sized location to get the very middle, a half size location to get 1/4th into the area and a quarter sized location for 1/8th into the area, and just center it on top or bottom to decide that part.
Report, edit, etc...Posted by spinesheath on 2007-01-12 at 19:54:11
QUOTE(Falkoner @ Jan 12 2007, 06:34 PM)
ADDITION:
You could meld me and spinesheath's ideas to make it so you can center different sized locations, and you would have the burrowed units on top and bottom of map rather than bottom and left. so you used the full sized location to get the very middle, a half size location to get 1/4th into the area and a quarter sized location for 1/8th into the area, and just center it on top or bottom to decide that part.
[right][snapback]612562[/snapback][/right]

Actually that's exactly what I meant tongue.gif Might not have become clear, I am always so bad at explaining stuff happy.gif
Next Page (1)