players leave = game over

branno

New Member
Reaction score
2
ok im trying to make a trigger so that when all the player of the opposite team leave the game your team will win.

here is what i got so far:
Code:
Events
        Player - Player 6 (Orange) leaves the game
        Player - Player 7 (Green) leaves the game
        Player - Player 8 (Pink) leaves the game
        Player - Player 9 (Gray) leaves the game
        Player - Player 10 (Light Blue) leaves the game
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (Player 6 (Orange) slot status) Equal to Has left the game
                        (Player 7 (Green) slot status) Equal to Has left the game
                        (Player 8 (Pink) slot status) Equal to Has left the game
                        (Player 9 (Gray) slot status) Equal to Has left the game
                        (Player 10 (Light Blue) slot status) Equal to Has left the game
            Then - Actions
                Wait 5.00 seconds
                Game - Victory Player 1 (Red) (Show dialogs, Show scores)
                Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
                Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
                Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
                Game - Victory Player 5 (Yellow) (Show dialogs, Show scores)
                Game - Defeat Player 6 (Orange) with the message: Defeat!
                Game - Defeat Player 7 (Green) with the message: Defeat!
                Game - Defeat Player 8 (Pink) with the message: Defeat!
                Game - Defeat Player 9 (Gray) with the message: Defeat!
                Game - Defeat Player 10 (Light Blue) with the message: Defeat!
            Else - Actions

any ideas?:)
 

Vestras

Retired
Reaction score
249
So... does it work or? You provided nearly no information.
From what I see it should work.
 

branno

New Member
Reaction score
2
does that not work? or do you need a trigger for the other team?

yea it doesnt work lol sorry left that part out, it may have not worked because when i tested it the game wasnt full so all the players wouldnt have been able to leave (dunno if that effects it)
 

Emu.Man00

New Member
Reaction score
41
Isn't there a condition player is not playing, instead of has left? If it's has left then it will only work if each and every one leaves, i.e. needs full house.
 

branno

New Member
Reaction score
2
there wasnt one for player is not playing but there was for player is un used
Code:
Events
        Player - Player 6 (Orange) leaves the game
        Player - Player 7 (Green) leaves the game
        Player - Player 8 (Pink) leaves the game
        Player - Player 9 (Gray) leaves the game
        Player - Player 10 (Light Blue) leaves the game
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        (Player 6 (Orange) slot status) Equal to Is unused
                        (Player 7 (Green) slot status) Equal to Is unused
                        (Player 8 (Pink) slot status) Equal to Is unused
                        (Player 9 (Gray) slot status) Equal to Is unused
                        (Player 10 (Light Blue) slot status) Equal to Is unused
            Then - Actions
                Wait 5.00 seconds
                Game - Victory Player 1 (Red) (Show dialogs, Show scores)
                Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
                Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
                Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
                Game - Victory Player 5 (Yellow) (Show dialogs, Show scores)
                Game - Defeat Player 6 (Orange) with the message: Defeat!
                Game - Defeat Player 7 (Green) with the message: Defeat!
                Game - Defeat Player 8 (Pink) with the message: Defeat!
                Game - Defeat Player 9 (Gray) with the message: Defeat!
                Game - Defeat Player 10 (Light Blue) with the message: Defeat!
            Else - Actions

that didnt work either, was thinking maybe if i made a trigger that said every 10 seconds of game time if all player on the team are un used then its victory/win, you think that might work?

im thinking that the problem may be that it waits 2 seconds after the player leaves to remove his units so it might count those units as the player still being there at the time of the player leaving.
 

Abion47

New Member
Reaction score
0
Add a trigger that goes along these lines:

Code:
Events
    Map init
Conditions
Actions
    If Player 1 is equal to Is Playing then add Player 1  to Player Group (Team1)
[Repeat for every player, swapping Team1 for Team2 when necessary]



Then add this to your trigger:

Code:
Events
        Player - Player 6 (Orange) leaves the game
        Player - Player 7 (Green) leaves the game
        Player - Player 8 (Pink) leaves the game
        Player - Player 9 (Gray) leaves the game
        Player - Player 10 (Light Blue) leaves the game
    Conditions
    Actions
        [B]Remove Triggering Player from Player Group (Team 2)[/B]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        [B]Number of Players in Player Group (Team2) equal to 0[/B]
            Then - Actions
                Wait 5.00 seconds
                Game - Victory Player 1 (Red) (Show dialogs, Show scores)
                Game - Victory Player 2 (Blue) (Show dialogs, Show scores)
                Game - Victory Player 3 (Teal) (Show dialogs, Show scores)
                Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
                Game - Victory Player 5 (Yellow) (Show dialogs, Show scores)
                Game - Defeat Player 6 (Orange) with the message: Defeat!
                Game - Defeat Player 7 (Green) with the message: Defeat!
                Game - Defeat Player 8 (Pink) with the message: Defeat!
                Game - Defeat Player 9 (Gray) with the message: Defeat!
                Game - Defeat Player 10 (Light Blue) with the message: Defeat!
            Else - Actions


Sorry about the sloppy wording. I don't have the map editor in front of me.
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
what if you set all the players you want to check for not being in the game into a player group, then you only have to check if all players in the player group are gone, rather then keep clicking so many times. Could clean it up =D
 

Emu.Man00

New Member
Reaction score
41
Code:
                Game - Defeat Player 6 (Orange) with the message: Defeat!
                Game - Defeat Player 7 (Green) with the message: Defeat!
                Game - Defeat Player 8 (Pink) with the message: Defeat!
                Game - Defeat Player 9 (Gray) with the message: Defeat!
                Game - Defeat Player 10 (Light Blue) with the message: Defeat!

Again, all this is pointless. You're only giving them a defeat message if none of them are there. If none of them are there how will they see it?
 

branno

New Member
Reaction score
2
thnx so much it worked :) i was also able to use this same method to fix the icons on my multiboard :D thnx again
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top