I think that everybody should know what locations are and how to use them, but there are some things that maybe not everybody knows:
-Locations are by default aligned in staredit to the 32x32 grid. The locations can have ANY size (1x1 is best size for a location that follows an unit) and can be in ANY place (they don't need to be aligned to that grid).
-When you move a location in game to a unit the location middle goes where the unit middle is. If there is not any unit that matches the trigger the location will be centered at the middle of the location where it tried to find the unit.
-'Anywhere' is a location like all the other ones, but editors hide it by default. It is as big as the map, so its middle is the middle of the map. The editors hide it but is posible edit it to any size hex editing.
And here I have some untested stuff. Maybe bolt that tested lots of things about locations wants to test this:
-Does a 0x0 location crashes/dissaparears?
-Does a location bigger than the map crashes?
-If a location bigger than the map doesn't crash, what happen if you make a location more than double of the map size and you create a unit in it? Will it create the unit out of the map bounds?
I think that you can use SF for test them.
QUOTE
-Does a 0x0 location crashes/dissaparears?
A 0x0 location does not exist, so it will dissappear in staredit.
QUOTE
-Does a location bigger than the map crashes?
No, I have tested the one. It doesn't crash.
QUOTE
-If a location bigger than the map doesn't crash, what happen if you make a location more than double of the map size and you create a unit in it? Will it create the unit out of the map bounds?
That's a good one. I assume it will crash, but I haven't tried it.
QUOTE(DT_Battlekruser @ Jul 26 2004, 05:43 PM)
QUOTE
-Does a 0x0 location crashes/dissaparears?
A 0x0 location does not exist, so it will dissappear in staredit.
I'm not talking about staredit, I'm talking about StarCraft.
If you make a location and shrink it to 0x0 in any editing program, it will not exist, and therefore dissapear. I think...
I think that locations bigger than the map will act as if they were the size of the map, as no action can be taken outside the map.
Don't mark this as true, this is only my thoughts, could be right and could be wrong.
I belive starforge will delete the location if it 0x0. If it were to be in starcraft i doubt it would crash. It would just mean that both points that define the location would be the same spot. I imagine it would work almost identical to a 1x1 location but i'm not sure.
Locations larger than the map are differant. In the game a location edge can not leave the edges of the map when you center the location.
I also belive starforge dosn't allow you to make a location that expands off the edge of the map. However i think some older versions might.
I generaly don't bother testing this sort of thing because it has no use that I can think of.
I have experimented and used locations with a dimension size of 0. I even have a map using one (though it's been abandoned)... I wanted a moving location that would pick up an enemy, move it to a location to be hit once, then return it to where it came from within a few frames. I had to make it 0 pixels wide so it wouldn't pick up a unit twice, though ultralisks can still be grabbed multiple times. >_>
The location will exist, and can be used just fine in triggers. However, you need to change the size of it LAST. If you resize it then create a new location, the old one will be overwritten (and all triggers will use the new location). I haven't tested making a ton of locations, making the 0x0 location, deleting the extra locations, then creating new ones, though. I don't think it would overwrite it, but I could be wrong.
Of course, you'll need two maps to safely use such locations in a map in progress: One with the size 0, and one without.
Don't quote me on this but I seem to remember using an older version of StarForge to make a location that extended beyond the boundaries of the map, and it crashed. Someone said it didn't but I'm pretty sure it did... if I'm wrong on that maybe I had tried to create a unit off the edge of the map and that did it. Oh well, maybe I'm wrong all together.
Believe it or not, you can make a 0x0 location in regular StarEdit. It doesn't last, though. Just turn on the grid and click on one of the pixels where a vertical and horizontal grid line cross. You can even rename the location. Apparently it disappears after you deselect it. I don't know whether or not it murders a string if you've renamed a 0x0 location and then deselect it. Stranger things have happened.
Yeah i knew about that. You can aslo drag the 1x1 location down to the grid and it works. I think you can ahve locations that go off the edge. Take a 6x6 location and center it on something on the edge of the map. Then create and air unit. If it is centered above the first unit you know that the location has gone of the edge of the map.
QUOTE
Don't quote me on this but I seem to remember using an older version of StarForge to make a location that extended beyond the boundaries of the map, and it crashed. Someone said it didn't but I'm pretty sure it did... if I'm wrong on that maybe I had tried to create a unit off the edge of the map and that did it. Oh well, maybe I'm wrong all together.
it must have been something else that made it crash. Bigger than map locations don't crash' I have tried it. Older version of starforge... I think they corrupt the maps a lot.
QUOTE(carlsagan43 @ Jul 28 2004, 11:50 AM)
Yeah i knew about that. You can aslo drag the 1x1 location down to the grid and it works. I think you can ahve locations that go off the edge. Take a 6x6 location and center it on something on the edge of the map. Then create and air unit. If it is centered above the first unit you know that the location has gone of the edge of the map.
Centering a location will not make it go off the map. I have used that techinqe to my advantage several times.
Theory: a location larger than the map will be constantly checked at its edges and repositioned to fit back into the map, and thus be constantly moving. Doubt that's the case, though (more likely it'll just crash).
I doubt SC checks location edges every second of game play, it is a waist of system resources. It probably only checks when a location is centered possibly at the start of the game.
What tuxedo said is that if the location is longer than the map SC will center it, then check if it exits of the map, then it will recenter it, but it will still out of the map, so it will recenter it again, etc.
What I think is that it will center the location and then check its 4 edges with an order. The last edge will be the last movement and there will the location be placed. If it is bigger than the double of the map then the middle will the out of the map and the actions will happen out?