• 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.

Help with a trigger...

Status
Not open for further replies.
Level 6
Joined
Jul 17, 2008
Messages
185
Hi everyone.

I wanted to make a trigger that checks if a player is alone in the game and if that is true then this player wins...

Heres my attempt:
  • Wining 1
    • Events
      • Map initialization
    • Conditions
      • (Player 2 (Blue) slot status) Equal to Has left the game
      • (Player 3 (Teal) slot status) Equal to Has left the game
      • (Player 4 (Purple) slot status) Equal to Has left the game
      • (Player 5 (Yellow) slot status) Equal to Has left the game
      • (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
      • (Player 11 (Dark Green) slot status) Equal to Has left the game
      • (Player 12 (Brown) slot status) Equal to Has left the game
    • Actions
      • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
I made 12 more like this but with diferent players as winners, but it doesnt work. I think it doesnt check the empty slot players but only the ones how left the game...

Help pls.
 
Level 15
Joined
Dec 18, 2007
Messages
1,098
Ok, make a Variable named Temp_Force or something and a Integer variable, then create a trigger with Time Elapsed is 0.00 as the event.
Make an event to set Temp_Force = Players in all players matching Player Controller is a player = true and Player is playing = to true. (both in boolean comparison).
Pick every player in the group and set the Integer variable to the integer variable+1
Add an if then else function, If integer variable= 1 then pick every player in Temp_Force and (Do the defeat event). Leave else empty.
 
Level 6
Joined
Jul 17, 2008
Messages
185
It doesnt work D:
Take a look to what i did

  • Init commands
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
      • Temp_Force Equal to ((Triggering player) is in (All players matching (((Triggering player) controller) Equal to User)))
      • Temp_Force Equal to ((Triggering player) is in (All players matching (((Triggering player) slot status) Equal to Is playing)))
    • Actions
      • Player Group - Pick every player in (All players) and do (Set A_DATA = (0 + 1))
      • If (A_DATA Equal to 1) then do (Player Group - Pick every player in (All players) and do (Game - Defeat Player 1 (Red) with the message: Defeat!)) else do (Do nothing)
P.S.: im a newbie so dont say WHAT A NOOOOOOOOOOOOOOOOOOB.
 
Status
Not open for further replies.
Top