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
248
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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top