Most of the ways i've though of are trigger inefficent, or just don't work. It's just irritating me, I don't really want to continue struggling with this. The map I'm making is an RPG, and uses a Zelda-esque vision system, you center vision on a 20x12 square, and you can move around in it. When you leave it, you center on the new square. Now, the problem is, I can't figure out a location effective way to do this, and it's really just getting me frustrated.
I could see it being done with grid systems, with either 1 or 5 locations. (1 location would take more triggers)
First you would need to find how many spaces of creating and removing a unit (say a mutalisk) would get from the center of one screen to the center of another. You would need to calculate for both up and down, and sideways.
Then when the player brings exactly 0 units to the main location, you could detect which way they went out with the 5 location way, and simply move the grid in that direction.
Or using one location you could grid up once, center the location, if they arent there, grid down two screens. If they aren't there grid up one screen and left one screen, and if they aren't there grid right two screens. This probably isn't the most effective way of doing it, but it would work, and it's just from the top of my head.
I don't understand what you just said, could you write it out in triggers?
I know a crude way that isnt unit effective. Have a different unit for every room that you can center a location on, and then center view.
I would place a burrowed unit at the center of each 20x12 square.
First center a location on the unit (Link or whoever). Then center the same location on the burrowed unit at the same location.
So everytime the unit (Link or whoever) leaves his location, center it on the unit (Link or whoever), then center it on the burrowed unit at the same location.
QUOTE(LegacyWeapon @ Aug 5 2005, 01:52 PM)
I would place a burrowed unit at the center of each 20x12 square.
First center a location on the unit (Link or whoever). Then center the same location on the burrowed unit at the same location.
So everytime the unit (Link or whoever) leaves his location, center it on the unit (Link or whoever), then center it on the burrowed unit at the same location.
[right][snapback]279686[/snapback][/right]
Well said, just make sure you use a advanced editor grid to place your units exactly.
I already know how I'm going to do it. Your "solution" has a view ways it could mess up, I'm just going to go with my current method.
the starcraft screen isnt exactly 20x12 either. The console at the bottom takes some of the edges away.
Remember that you're really utilizing less than 10x18, because you'll need at least 1 square on each side at which to go "off the map" at. The lower left console for the alliance stuff also takes 1 more row.
QUOTE(Wilhelm @ Aug 6 2005, 02:44 PM)
I already know how I'm going to do it. Your "solution" has a view ways it could mess up, I'm just going to go with my current method.
[right][snapback]280482[/snapback][/right]
I used it in my Mage Tactics Arena map (not center viewing but randomly exploding squares). It worked perfectly. Tell me how it would "mess up."
QUOTE(PCFredZ @ Aug 6 2005, 05:48 PM)
Remember that you're really utilizing less than 10x18, because you'll need at least 1 square on each side at which to go "off the map" at. The lower left console for the alliance stuff also takes 1 more row.
[right][snapback]280600[/snapback][/right]
You mean 18x10 i assume.
QUOTE((U)Bolt_Head @ Aug 7 2005, 01:56 AM)
You mean 18x10 i assume.
[right][snapback]280853[/snapback][/right]
