• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Ending game if Single Player

Status
Not open for further replies.
Level 1
Joined
Feb 17, 2010
Messages
2
I've been trying to create a trigger that ends the game if only one player is present, I've tried multiple ways of doing it, and they've all failed, lol.

I'm thinking It'll need integers, but I don't know how to go about setting that up.

Can anyone lend me a hand here

Edit: It would be at like Game Time 1.00 second, so that if players quit the last person doesnt get booted.
 
Level 3
Joined
Feb 8, 2010
Messages
34
  • Events
    • Time - Elapsed game time is 1.00 seconds
  • Conditions
    • (Number of players in (All players controlled by a User player)) Equal to 1
  • Actions
    • Game - Defeat Player 1 (Red) with the message: Defeat!
    • Game - Defeat Player 2 (Blue) with the message: Defeat!
    • Game - Defeat Player 3 (Teal) with the message: Defeat!
    • Game - Defeat Player 4 (Purple) with the message: Defeat!
    • Game - Defeat Player 5 (Yellow) with the message: Defeat!
    • 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!
    • Game - Defeat Player 11 (Dark Green) with the message: Defeat!
    • Game - Defeat Player 12 (Brown) with the message: Defeat!
    • Game - Defeat Player 11 (Dark Green) with the message: Defeat!
I'm sure there's an easier way to do this, but my mind isn't working today :D
 
It requires "Is Playing" too. The condition would go like this:
  • Trigger
  • Events
    • Time - Elapsed game time is 0.00 seconds
  • Conditions
  • Actions
    • Set Force = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
    • Player Group - Pick every player in Force and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of players in Force) Equal to 1
          • Then - Actions
            • Game - Defeat (Picked player) with the message: Defeat!
          • Else - Actions
    • Custom script: call DestroyForce (udg_Force)
 
Status
Not open for further replies.
Top