Need a trigger with Win condition for 2 players Team ffa (2v2v2v2). Cant make it well working...
Win\lose
Events
Unit - Any Unit dies
Local Variables
teams = 0 <Integer>
players = 0 <Integer>
Conditions
(Unit type of (Triggering unit)) == Command Center
Actions
Game - End game in Defeat for player (Triggering player) (Show dialogs, Show score screen)
Player - Set player (Triggering player) color to (Player 00) White (Retain the color of existing units)
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Required: Structure; Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Change ownership of (Picked unit) to player (Killing player) and Change Color
General - For each integer teams from 1 to 4 with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
(Number of players in (Allies of player (Triggering player))) == 0
(Number of players in (Active Players)) <= 2
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
(Players on team teams) == (Active Players)
Then
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
Else
Else
(Number of players in (Allies of player (Triggering player))) == 0
Even if the other ally has "lost" they are still in the game, this condition won't be true. You may need to create a variable array for each team, determining whether or not one of the players in the team has "lost" the game (such that they have lost, but have not been defeated) and check that condition instead.
Also using an "and" condition is redundant, all conditions are assumed to be "and", you only need to use "and" when using in conjunction with "or" conditions and in select other cases.
Win
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
players = 0 <Integer>
Conditions
(Number of players in (Active Players)) <= 2
Actions
General - For each integer players from 1 to 8 with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Allies of player players) == (Active Players)
Then
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
Else
Events
Timer - Every 10.0 seconds of Game Time
Local Variables
players = 0 <Integer>
Conditions
(Number of players in (Active Players)) <= 2
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - For each integer players from 1 to 8 with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player players) == Playing
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
(Picked player) != players
(Player (Picked player) treats player players as Ally) == true
Then
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
Trigger - Turn (Current trigger) Off
Else
Else
solo Win
Events
Timer - Every 10.0 seconds of Game Time
Local Variables
players = 0 <Integer>
Conditions
(Number of players in (Active Players)) <= 1
Actions
Game - End game in Victory for player (Number of players in (Active Players)) (Show dialogs, Show score screen)
Trigger - Turn (Current trigger) Off
Need a trigger with Win condition for 2 players Team ffa (2v2v2v2). Cant make it well working...
Win\lose
Events
Unit - Any Unit dies
Local Variables
teams = 0 <Integer>
players = 0 <Integer>
Conditions
(Unit type of (Triggering unit)) == Command Center
Actions
Game - End game in Defeat for player (Triggering player) (Show dialogs, Show score screen)
Player - Set player (Triggering player) color to (Player 00) White (Retain the color of existing units)
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Required: Structure; Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Change ownership of (Picked unit) to player (Killing player) and Change Color
General - For each integer teams from 1 to 4 with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
(Number of players in (Allies of player (Triggering player))) == 0
(Number of players in (Active Players)) <= 2
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
(Players on team teams) == (Active Players)
Then
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
Else
Else
Quote from TwoDie:
bump :S
(Number of players in (Allies of player (Triggering player))) == 0
Even if the other ally has "lost" they are still in the game, this condition won't be true. You may need to create a variable array for each team, determining whether or not one of the players in the team has "lost" the game (such that they have lost, but have not been defeated) and check that condition instead.
Also using an "and" condition is redundant, all conditions are assumed to be "and", you only need to use "and" when using in conjunction with "or" conditions and in select other cases.
Now I have separated win condition to:
Win
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
players = 0 <Integer>
Conditions
(Number of players in (Active Players)) <= 2
Actions
General - For each integer players from 1 to 8 with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Allies of player players) == (Active Players)
Then
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
Else
Sure its doest work...
anyone?....
while people here want desperately to help me...
Here is how it finally works...:
team Win
Events
Timer - Every 10.0 seconds of Game Time
Local Variables
players = 0 <Integer>
Conditions
(Number of players in (Active Players)) <= 2
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - For each integer players from 1 to 8 with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player players) == Playing
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
(Picked player) != players
(Player (Picked player) treats player players as Ally) == true
Then
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
Trigger - Turn (Current trigger) Off
Else
Else
solo Win
Events
Timer - Every 10.0 seconds of Game Time
Local Variables
players = 0 <Integer>
Conditions
(Number of players in (Active Players)) <= 1
Actions
Game - End game in Victory for player (Number of players in (Active Players)) (Show dialogs, Show score screen)
Trigger - Turn (Current trigger) Off
TwoDie