| 12-30-2005, 08:20 PM | #1 |
I'm looking for the triggers to give victory to all players left in the game when that team has no more enemies (people left in the game). I.E. All players on opposite team are defeated and/or leave the game out of free will. I just don't know what triggers to use here. Anyone know? Hold on I might have it, would this work, and if so, is there any way to have a more, optimized trigger? Code:
Events
Player - Player 1 (Red) leaves the game with a defeat
Player - Player 3 (Teal) leaves the game with a defeat
Player - Player 5 (Yellow) leaves the game with a defeat
Player - Player 7 (Green) leaves the game with a defeat
Player - Player 9 (Gray) leaves the game with a defeat
Player - Player 11 (Dark Green) leaves the game with a defeat
Conditions
And - All (Conditions) are true
Conditions
((Player 1 (Red) slot status) Equal to Has left the game) or ((Player 1 (Red) slot status) Equal to Is unused)
((Player 3 (Teal) slot status) Equal to Has left the game) or ((Player 3 (Teal) slot status) Equal to Is unused)
((Player 5 (Yellow) slot status) Equal to Has left the game) or ((Player 5 (Yellow) slot status) Equal to Is unused)
((Player 7 (Green) slot status) Equal to Has left the game) or ((Player 7 (Green) slot status) Equal to Is unused)
((Player 9 (Gray) slot status) Equal to Has left the game) or ((Player 9 (Gray) slot status) Equal to Is unused)
((Player 11 (Dark Green) slot status) Equal to Has left the game) or ((Player 11 (Dark Green) slot status) Equal to Is unused)
Actions
Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
Game - Victory Player 6 (Orange) (Show dialogs, Show scores)
Game - Victory Player 8 (Pink) (Show dialogs, Show scores)
Game - Victory Player 10 (Light Blue) (Show dialogs, Show scores)
Game - Victory Player 12 (Brown) (Show dialogs, Show scores) |
| 12-30-2005, 10:11 PM | #2 |
That event only works in melee games as far as I know. it isnt triggered when you defeat one by Game - Defeat. |
| 12-30-2005, 10:45 PM | #3 |
Ok, so what do I do then? Would the player leaves game event work? |
| 12-30-2005, 11:24 PM | #4 |
No, just after you use the Game - Defeat action, run this trigger checking conditions. |
| 12-31-2005, 01:13 AM | #5 |
There is a leaves the game event (without the with a defeat thing) |
| 12-31-2005, 01:28 AM | #6 |
So, should I use the 'leaves game' event or use the 'run trigger' action ? |
| 12-31-2005, 09:39 AM | #7 |
No, the leaves game event does NOT run when you defeat someone. |
| 12-31-2005, 10:24 AM | #8 |
How does your win condition work? How do you check if the enemy is being defeated? What main building is lost, or is it the hero of the enemy has fallen? |
| 12-31-2005, 04:17 PM | #9 |
I have a player group and removes player from there if they lose or leave. Then I check if a team eliminated all foes from the player group. |
| 12-31-2005, 05:22 PM | #10 |
Ok now, the only thing I changed in this trigger is, 'Player Leaves Game' event. I also made a 'Run Trigger Checking Conditions' Action after the 'Defeat' action in a previous trigger. This way, it should check every time someone is defeated and everytime someone leaves the game. |
