As you may have guessed from the thread title, I am having a problem with SC2 Editor triggers. Normally I've been quite resourceful in finding a solution to my problems, but this one I can't solve. Please help me.
I am looking to create a trigger that does something like this:
Event: Player group Active Marines owns 0 Marines.
Action: End game in defeat for player group Active Marines.
For clarification, in SC classic, it would look like this:
There is a catch, however. The units I want to die are not alive at the beginning of the map. Triggers spawn them shortly after that. I can't use the Unit Dies event... at least, I don't think I can.
My thanks go to anyone who tries to help me with this.
Create a unit group global variable. Then put those units into that unit group.
Then create a trigger like this
Marines
Events
Unit - Any Unit dies
Local Variables
Conditions
((Triggering unit) is in Marines) == true
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in Marines) == 0
Then
Game - End game in Defeat for player (Triggering player) (Show dialogs, Show score screen)
Else
Or you could set a boolean for when you start spawning these units, and you simply use the trigger you would to check if there are none alive, but check if the boolean is true.
I don't think I mentioned that the player group Active Marines consists of 7 players... These triggers would still work for ending in defeat of all 7 players?
Even if they don't, I should be able to modify them slightly so they do... I'm not all that useless ;)
Hello, my name is Shawn.
As you may have guessed from the thread title, I am having a problem with SC2 Editor triggers. Normally I've been quite resourceful in finding a solution to my problems, but this one I can't solve. Please help me.
I am looking to create a trigger that does something like this:
Event: Player group Active Marines owns 0 Marines. Action: End game in defeat for player group Active Marines.
For clarification, in SC classic, it would look like this:
There is a catch, however. The units I want to die are not alive at the beginning of the map. Triggers spawn them shortly after that. I can't use the Unit Dies event... at least, I don't think I can.
My thanks go to anyone who tries to help me with this.
@LordFelco:
Create a unit group global variable. Then put those units into that unit group.
Then create a trigger like this
Marines
Events
Unit - Any Unit dies
Local Variables
Conditions
((Triggering unit) is in Marines) == true
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in Marines) == 0
Then
Game - End game in Defeat for player (Triggering player) (Show dialogs, Show score screen)
Else
i would use (no variable required):
Or you could set a boolean for when you start spawning these units, and you simply use the trigger you would to check if there are none alive, but check if the boolean is true.
E.g.:
Actually, you might not even need the boolean. Just turn on the trigger when it's time to spawn.
I don't think I mentioned that the player group Active Marines consists of 7 players... These triggers would still work for ending in defeat of all 7 players?
Even if they don't, I should be able to modify them slightly so they do... I'm not all that useless ;)
Thanks for the help!
if the marines are 7 players I suggest to use the trigger by gizmachu. the other 2 go out from that one player controls a group of marines