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

[Trigger] Player detection

Status
Not open for further replies.
Level 3
Joined
Jul 29, 2008
Messages
30
I'm trying to detect Which player slots aren't being used by a computer or a user that is active. This is the trigger I'm using.

Players 1-10 are set to user 11 and 12 are computer players. But All I get with this is one computer player. Any suggestions?

  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((Picked player) slot status) Equal to Is unused) or (((Picked player) controller) Not equal to User)
        • Then - Actions
          • Game - Display to (All players) the text: ((String((Player number of (Picked player)))) + is not in use)
        • Else - Actions
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Try this:

  • -------- I am checking every possible slot using a loop --------
  • For each (Integer A) from 1 to 12, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player((Integer A))) slot status) Equal to Is unused
        • Then - Actions
          • -------- Your actions here --------
        • Else - Actions
 
Level 3
Joined
Jul 29, 2008
Messages
30
Seems to work fine except for some reason I dont detect that player two is not being used while testing in world editor. Havnt tried from frozen throne at all. I have a computer player at slot 11 could this be causing it?
 
Status
Not open for further replies.
Top