Here's another variation to what Ahli posted, although in general Ahli's method is preferable. However, understanding how this works will improve your understanding of trigger order.
Also, in Ahli's method if two players run the spawn trigger in the same trigger cycle then the first player's display message will be overwritten because the conditions of the death count will change before other players get a chance to run their display trigger.
A detailed scenario would be as follows:
Suppose that Players 1 to 8 are in Force 1 and Player 1 and Player 2 are saved at the same time.
Player 1's triggers run first. His SCV is spawned and the death count for everyone in Force 1 is set to 1. Player 1's display trigger saying "Player 1 saved" is then run, because the death count is equal to 1.
Now Player 2's triggers run. His SCV is spawned and the death count for everyone in Force 1 is set to 2. Player 2's display trigger is run. However, because the death count is equal to 2 the display trigger that runs is "Player 2 saved." What has happened is the trigger that spawns an SCV for Player 2 has set Force 1's death count from 1 to 2,
before the display trigger that says "Player 1 saved" based on the death count being 1.
Now the remaining triggers for Force 1 will be run in order (all of P3, then all of p4... up to P8) and they will only display "Player 2 saved" because the death count has been set to 2.
When all the triggers for each player has been cycled through, it will go back to Player 1 and run his triggers again. Since his death count is also 2, he will then see "Player 2 saved."
As a result, everyone except for Player 1 will see only the "Player 2 saved" message. Player 1 will be the only one that sees "Player 1 saved" and "Player 2 saved".
OWNER:
Force 1
CONDITIONS:
Current Player has suffered at least 1 of "UNIT THAT DOESNT DIE INGAME"
ACTIONS:
Preserve Trigger
Modify Death counts for Current Player: Set to 0 for "UNIT THAT DOESNT DIE INGAME"
______________________________________________________
OWNER:
Force 1
CONDITIONS:
Current Player brings exactly 0 SCV to 'Anywhere'
Force 1 brings atleast 1 SCV to 'middle'
'spwn rdy' is set
ACTIONS:
Preserve Trigger
Clear 'spwn rdy'.
Create 1 SCV at 'middle' for Player #.
Modify Death counts for Current Player: Set to 1 for "UNIT THAT DOESNT DIE INGAME"
______________________________________________________
OWNER:
Force 1
CONDITIONS:
Player # has suffered exactly 1 of "UNIT THAT DOESNT DIE INGAME"
ACTIONS:
Preserve Trigger
Display for current player: Player # has been saved.
Play Wav: 'noise'
The triggers above do not suffer from the problem I outlined earlier.
Post has been edited 2 time(s), last time on Aug 2 2009, 10:35 pm by Pariah.
None.