Staredit Network

Staredit Network -> UMS Assistance -> centering locations
Report, edit, etc...Posted by l)ark_13 on 2005-04-21 at 23:07:28
I have a trigger like this:

Trigger
Players:
¤ Player 1
Conditions:
¤ Always.
Actions:
¤ Center 'location' on 'Unit 1' at 'anywhere'.
¤ Center 'location' on 'Unit 2' at 'anywhere'.
¤ Center 'location' on 'Unit 3' at 'anywhere'.
¤ Center 'location' on 'Unit 4' at 'anywhere'.
¤ Preserve Trigger.


Only one of the "Units" exists throughout the whole game (you choose which one). Whenever I make a trigger to center view to "location" it center views to the middle of the map signifying that "location" isn't centering on the "Unit".

Do I need to make a death count for each "Unit" and then a trigger for each "Unit" so that it only centers on a specific "Unit"? (Eg. pick "Unit 1" set death count to 1. When death count is exactly 1 make "location" center on "Unit 1". Then do this 3 more times for the other 3 units).
Report, edit, etc...Posted by LegacyWeapon on 2005-04-21 at 23:11:25
That's basically what you need to do. You could do a "Current Player commands at least" condition...

Edit - However, if you are using hypers and the unit never leaves the location, you could use method 1 described here:
http://www.staredit.net/index.php?tutorial=57

And when the unit teleports, you will move the location on the unit at the place where the unit ends up.
Report, edit, etc...Posted by in_a_biskit on 2005-04-21 at 23:34:32
If a trigger is told to center a location on a unit that isn't there, the location moves to the middle of the map instead.

So if the last unit doesn't exist or isn't in your location (in this case, "anywhere"), then the location will end up in the middle of the map.

So as Legacy said, you should have separate triggers with different conditions (probably a "player commands units" condition).
Report, edit, etc...Posted by l)ark_13 on 2005-04-21 at 23:37:58
Ya, sorry. I forgot about that "center location on no unit at a location centers the location on that other location" tongue.gif . Thanks though; now my map works biggrin.gif .
Report, edit, etc...Posted by (U)Bolt_Head on 2005-04-22 at 00:27:03
You wouldn't need death counters. or seperate locations.

Just make 4 seperate triggers each with the conditions of "current player commands at least one of unit X"
Report, edit, etc...Posted by sckor on 2005-04-22 at 05:38:17
Can't you just do center on men for current player? ( a different location for each player)
Report, edit, etc...Posted by in_a_biskit on 2005-04-22 at 07:14:56
If you were doing that, you probably wouldn't even need a different location for each player (that does work in some cases, look at one location bound)...

But I think the idea is that you can have more than 1 unit and one of them is an upgradable hero or something... I may be wrong.
Report, edit, etc...Posted by sckor on 2005-04-22 at 21:19:54
I mean, if it is only one hero, and no perchusable mercenarys or anything (an RPG point of view) you would only need center location on Men, I think.
Report, edit, etc...Posted by O)FaRTy1billion on 2005-04-22 at 21:53:19
If you look, the center location is:
Trigger
Actions:
¤ Center 'location1' on 'unit' for 'player' at 'location2'.

If the unit isn't in 'location1' it will go to the middle of 'location2'. Only reason it normally goes into the middle of the map is because 'Anywhere' is usually used.
Next Page (1)