Hi Everyone
I'm new to SC 2, but a long time player and map maker.
I have a map with 10 units on it. I created them when I made the map. We'll call them marines but it could be any unit.
I have a Point that I'd like them all to move to at the same time. How do I create a trigger to do this?
I've played with triggers but my problem was how to get the 10 units into the group, then referring to them AS a group to Move, Attack, etc.
I hope I'm clear. I searched the forum but found nothing usable.
Very easy. So go to the trigger editor and make a new trigger. set the event to whatever you want. (you will want it to go off at the same time you create a ll the marines)
actions:
issue order to unit group (units in region matching condition). set the order type (you must click on one of the parentheses to do this) to an order targeting point, and set the order to attack. Set the point to wherever you want.
This should work. If you are creating your marines with triggers and all at the same time, you can use "last created units" instead of "units in region matching condition"
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
Here's one way of doing it (This runs at map initialization): First (1), make a local or global unit group variable. I would suggest making a global if you want to order these same units easily in another trigger, if you're not going to ever order them again then you don't even need this. Secondly (2), do an action that makes 10 marines at map initialization at the center of the map (or any region you want). Third (3), add a unit group to your variable unit group that you created, in this instance the 2 unit groups are the marines at the region you created them and the unit group variable you made earlier. Fourth (4), order all the units in the unit group to move (you have to set it to order targeting a point) to a region or point.
Example:
Trigger Name Events
Game - Map initialization Local Variables
1.) Marine Group = (Empty unit group) <Unit Group> Conditions Actions
2.) Unit - Create 10 Marine for player 1 at (Center of (Entire map)) using default facing (No Options)
3.) Unit Group - Add all units in (Marine units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to Marine Group
4.) Unit - Order all units in Marine Group to ( Move targeting (Bottom-left of (Entire map) bounds)) (Replace Existing Orders)
I could not find the -> Unit Group - Add all units in (Marine units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to Marine Group
So I added a region to the map and set My Unit Group's variable to Any units in My Group (which is a variable that points to the region) owned by player 1
Then Unit - Order all units in My Unit Group to ( Turn targeting Point Left) (Replace Existing Orders)
and they all turned left
Now I have control of them. Sorry I don't know how to copy triggers to the forums yet.
Thanks all. You got me in the right direction anyway, and I have control of them. Now I can order an attack or whatever.
Reinforcements maybe.... :D
Hi Everyone I'm new to SC 2, but a long time player and map maker.
I have a map with 10 units on it. I created them when I made the map. We'll call them marines but it could be any unit. I have a Point that I'd like them all to move to at the same time. How do I create a trigger to do this?
I've played with triggers but my problem was how to get the 10 units into the group, then referring to them AS a group to Move, Attack, etc.
I hope I'm clear. I searched the forum but found nothing usable.
Thanks so much.
Very easy. So go to the trigger editor and make a new trigger. set the event to whatever you want. (you will want it to go off at the same time you create a ll the marines)
actions:
issue order to unit group (units in region matching condition). set the order type (you must click on one of the parentheses to do this) to an order targeting point, and set the order to attack. Set the point to wherever you want.
This should work. If you are creating your marines with triggers and all at the same time, you can use "last created units" instead of "units in region matching condition"
Here's one way of doing it (This runs at map initialization): First (1), make a local or global unit group variable. I would suggest making a global if you want to order these same units easily in another trigger, if you're not going to ever order them again then you don't even need this. Secondly (2), do an action that makes 10 marines at map initialization at the center of the map (or any region you want). Third (3), add a unit group to your variable unit group that you created, in this instance the 2 unit groups are the marines at the region you created them and the unit group variable you made earlier. Fourth (4), order all the units in the unit group to move (you have to set it to order targeting a point) to a region or point.
Example:
Trigger Name
Events
Game - Map initialization
Local Variables
1.) Marine Group = (Empty unit group) <Unit Group>
Conditions
Actions
2.) Unit - Create 10 Marine for player 1 at (Center of (Entire map)) using default facing (No Options)
3.) Unit Group - Add all units in (Marine units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to Marine Group
4.) Unit - Order all units in Marine Group to ( Move targeting (Bottom-left of (Entire map) bounds)) (Replace Existing Orders)
I hope this helped.
@GaryFishFx: Go
Do I detect a golems map? :-D
Nope. HAHAHAHA
I could not find the -> Unit Group - Add all units in (Marine units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to Marine Group
So I added a region to the map and set My Unit Group's variable to Any units in My Group (which is a variable that points to the region) owned by player 1 Then Unit - Order all units in My Unit Group to ( Turn targeting Point Left) (Replace Existing Orders) and they all turned left Now I have control of them. Sorry I don't know how to copy triggers to the forums yet.
Thanks all. You got me in the right direction anyway, and I have control of them. Now I can order an attack or whatever. Reinforcements maybe.... :D
@JTG2003: Go