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

Need a Trigger to count players in-game?

Status
Not open for further replies.
Level 8
Joined
May 7, 2007
Messages
278
Hi, I'm creating a hero map, and I need to track how many of the total players are users, and not empty.

This doesn't seem to be working for me:

  • Events
    • Map initialization
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Player 1 (Red) controller) Equal to User
      • Then - Actions
        • Set PlayersInGame = (PlayersInGame + 1.00)
      • Else - Actions

and i'm doing that for each player. It seems to at the start, think that all players are users, EXCEPT for the ones that I make computer when I start the game.
If anyone could help me figure out what I'm doing wrong, that'd be great. +rep


EDIT: NEVERMIND! I'm a complete retard. I was using the wrong condition.
 
Last edited:
Level 5
Joined
May 12, 2008
Messages
80


Try it this way. The variable is a player-group and every player's slot which is used by a human player will be put into the group.
 
Status
Not open for further replies.
Top