In a map I've been working on, I've been having an odd problem. Even when some players are not active it will still create units for them with the "create unit" trigger. So I simply need to know how I can detect at the beginning of the game if a player is active or not.
None.
Isn't it as simple as 'player x commands at least 1 y' at the beginning of the map (or alternatively, each trigger that creates stuff for that player)?
In a map I've been working on, I've been having an odd problem. Even when some players are not active it will still create units for them with the "create unit" trigger. So I simply need to know how I can detect at the beginning of the game if a player is active or not.
Place a Unit or each player which never dies....
then start "current player command at least/exxactly 1 of UNIT"
that's all....
Please report errors in the Staredit.Network forum.
Yes.
Please report errors in the Staredit.Network forum.
Alright thanks, that's all I needed.
Moderator may lock.
None.
That's not a very good way of doing it. Death counts would be better, or Killer Kow's method. By placing units which never die, you essentially waste your max units in the map, and I don't think it looks good.
Preplaced units and Triggers won't run for players who aren't there. However, if another player has a trigger which creates units for the player who left, those units will still be created.
I suggest you change your triggers to only have units created for current player, and give them to the appropriate player.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
I suggest you change your triggers to only have units created for current player, and give them to the appropriate player.
This.
Everything else is just cleaning up the symptoms of poorly made triggers.
This bug only happens when you specifically tell the game to create a unit for a player who is not there. Now, usually triggers like this don't run, because in most cases the map maker puts the triggers that create units for the player, under the player the units will be owned by, so if the player is gone, the triggers creating the units don't run.
However, in your case you probably had a computer own the trigger creating the unit, so it created units for "Ghost Players" which by default are enemies to the players, the reason why using Current Player instead works is because if you set it for a force, the trigger is simply split into multiple triggers, for each active player, so if the player isn't there, the trigger split for him doesn't run.
None.