• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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