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!
How can I make an event like: Player 1 (Red) current gold becomes equal to 100. But instead of one specific player (red), it triggers when any player's current gold becomes equal to 100?
As far as I know, there's no generic player events. You have to add the same event multiple times to a trigger. Then, use Get Triggering Player function in order to reference which player fired that specific trigger. If you don't want to click a lot on those events when creating them, use a loop in a trigger that runs when map initializes.
Initialize generic player events
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Trigger - Add to Player earns 100 gold <gen> the event (Player - (Picked player)'s Current gold becomes Equal to 100.00)
Player earns 100 gold
Events
Conditions
Actions
-------- Do whatever --------
You can also use this loop instead of Player Group
Initialize generic player events
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Custom script: set udg_MaxPlayers = bj_MAX_PLAYERS
For each (Integer A) from 1 to MaxPlayers, do (Actions)
Loop - Actions
Trigger - Add to Player earns 100 gold <gen> the event (Player - (Player((Integer A)))'s Current gold becomes Equal to 100.00)
The difference between Player Group (All Players) and that specific For Loop is that the player group will only add active users and computers. It ignores neutral, rescuable and inactive players.
Okay thanks, I'll try to work it out this way then, I just hoped I was blind to an easier solution, but this is also good. At least a lot better than what I tried.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.