I global actions going on for every player beacon and I dont want it to activate if a player has left or has dropped. Anyway to detect this so I can set a switch?
None.
Detecting leaving is easy: Have a trigger that runs for All Players that sets a switch/DC if Player One commands exactly 0 [any unit], and then copies for all the other players.
None.
Sweet. I have that but no way to test it since I only have one computer. Thanks! Your a good guy!
Woops. Say i have a trigger, it adds 1 to an "ActivePlayer" death count. Will having another trigger with this (above) command run that if the players arent there right off the bat? or only if they leave?
None.
I'm not sure I understand... If you are asking "Will your trigger detect if a player never joined?", then yes. If a player never joins in the first place, their units never appear on the map, so the trigger would say that they left.
None.
Ok. Well heres what it is so you can see. PlayersActive is not about who is present, its about who is in the game. If you lose you can observe so your not in the game. However if a non observing player drops i want PlayersActive to diminish to suit the rest of the players tournament style game.
Condition:
dcGameStart = 1
Current Player commands at least 1 anything
Action:
dcPlayersActive + 1
(the above condition wont run for any null players right?)
Condition:
dcGameStart = 1
Current Player commands exactly 0 anything
PlayerObserving = 0 (if the player isnt observing, meaning he would still be in the round if he commands 0)
Action:
PlayersActive - 1
(will this run for null players?)
What I mean to say is what triggers will run for Current Player? I thought the players triggers were disabled if the player is not present.
None.
You could have it run by a computer player.
None.
What I mean to say is what triggers will run for Current Player? I thought the players triggers were disabled if the player is not present.
Right. Dont forget that setting triggers for All Players is equivalent to copying the trigger for each player. Triggers for players which dont present in the game (empty slot at start, dropped players, or players who left the game) are not executed. I suppose you call such players a
null players.
Condition:
dcGameStart = 1
Current Player commands at least 1 anything
Action:
dcPlayersActive + 1
(the above condition wont run for any null players right?)
This is the reason this trigger wont run for null players, as you name them.
Condition:
dcGameStart = 1
Current Player commands exactly 0 anything
PlayerObserving = 0 (if the player isnt observing, meaning he would still be in the round if he commands 0)
Action:
PlayersActive - 1
(will this run for null players?)
This is also the reason this trigger wont work properly. You must detect null players using triggers of players who are in the game.
You need some copying to make this work. The last trigger could be rewritten to:
TRIGGER
OWNERS: AllPlayers
CONDITIONS:
Player n commands exactly 0 any unit.
Player n has suffered: exacly 0 deaths of dcPlayerObserving
Player n has suffered: exacly 0 deaths of dcPlayerNull
ACTIONS:
Set deaths for Player n: set to 1 of dcPlayerNull
// whatever you wish, I dont understand how you're tracking active players.
We need the dcPlayerNull because otherwise this trigger would have been executed for each active player. To counter this the first player executing the trigger checks player n as already treated.
Finally you should copy this trigger for each player's number n from 1 to 8, which I usually write like:
FOR n=1 TO 8 DO
TRIGGER
OWNERS: AllPlayers
CONDITIONS:
Player n commands exactly 0 any unit.
Player n has suffered: exacly 0 deaths of dcPlayerObserving
Player n has suffered: exacly 0 deaths of dcPlayerNull
ACTIONS:
Set deaths for Player n: set to 1 of dcPlayerNull
// whatever you wish, I dont understand how you're tracking active players.
END
Once more, please note that actions will be executed for each null player at the moment when he becomes null. Triggers for empty player slots will be executed right at start.
Post has been edited 2 time(s), last time on Jan 16 2009, 8:16 am by Wormer.
Some.
Ok I did it with the computer player. Im going to test with 4 players this weekend at my buddies.
Thanks wormer. I was keeping track of them with dcPlayerStatus, 0 null, 1 active, 2 other things. So this should work. The key point was not to subtract from total players active without him actually being gone and not never there lol. So I can discern how many rounds to play of elimination. I'm probably going long ways about it but its my first map in several years so I'm rusty. It's turning out pretty good though. Thanks again.
None.