So I wanted to make a gold system, where if player plays alone he gets 160 gold and if there are two players they gain 80 gold and so on. I tried all colors in single player from slots 1 to 8.
On every attempt I gained 160 gold, yay!
Afterwards I tried this on multiplayer with my friend, I tried slots 4 (purple) and slots 7 (green) and gained 80 gold on each game, which is correct, since I wanted to share the 160 gold amongst 2 active players.
Now the problem is that my friend used slot 8 (pink) and didn't get any gold. Once again I tested all the slots from 1-8 and it gives the gold. Originally the player set up was on map ini trigger and I thought it might not calculate the players correctly if they "connect at different times".
I also increased the elapsed game time from 0.01 to 0.05 and then to 0.25 seconds to see if it helped my friend and it did not.
Oh and also the trigger which creates the builders, made the builder for slot 8 (pink).
I am confused.
EDIT: I manually added all the slots to activeplayers in single player and only the first player in Player group gets the gold, so in this case slot 1 (red) gets 160 gold / 8 = 20 gold and players from 2-8 have 0 gold. Forgot that this might happen when looping through player groups.
On every attempt I gained 160 gold, yay!
Afterwards I tried this on multiplayer with my friend, I tried slots 4 (purple) and slots 7 (green) and gained 80 gold on each game, which is correct, since I wanted to share the 160 gold amongst 2 active players.
Now the problem is that my friend used slot 8 (pink) and didn't get any gold. Once again I tested all the slots from 1-8 and it gives the gold. Originally the player set up was on map ini trigger and I thought it might not calculate the players correctly if they "connect at different times".
I also increased the elapsed game time from 0.01 to 0.05 and then to 0.25 seconds to see if it helped my friend and it did not.
Oh and also the trigger which creates the builders, made the builder for slot 8 (pink).
I am confused.
EDIT: I manually added all the slots to activeplayers in single player and only the first player in Player group gets the gold, so in this case slot 1 (red) gets 160 gold / 8 = 20 gold and players from 2-8 have 0 gold. Forgot that this might happen when looping through player groups.
-
Start
-
Events
-
Time - Elapsed game time is 0.25 seconds
-
-
Conditions
-
Actions
-
-------- Player set up --------
-
Set VariableSet Players = (All players matching (((Matching player) slot status) Equal to Is playing).)
-
Set VariableSet ActivePlayers = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)).)
-
Player Group - Pick every player in ActivePlayers and do (Actions)
-
Loop - Actions
-
Player - Set (Picked player).Current gold to (160 / (Number of players in ActivePlayers))
-
-
-
-------- Cam setup --------
-
Set VariableSet CamStrings[1] = 2000
-
Set VariableSet CamStrings[1] = 2200
-
Set VariableSet CamStrings[1] = 2400
-
Set VariableSet CamStrings[1] = 2600
-
Set VariableSet CamStrings[1] = 2800
-
Set VariableSet CamStrings[1] = 3000
-
-------- --------
-
Set VariableSet TeamLife = 100.00
-
-------- --------
-
Player - Turn Gives bounty On for Player 13 (Maroon)
-
-------- Start Timer --------
-
Countdown Timer - Start StartTimer as a One-shot timer that will expire in 90.00 seconds
-
Set VariableSet StartTimer = (Last started timer)
-
Countdown Timer - Create a timer window for StartTimer with title First Wave In:
-
Set VariableSet StartTimerWindow = (Last created timer window)
-
Countdown Timer - Show StartTimerWindow
-
-------- Builders and start camera --------
-
Player Group - Pick every player in ActivePlayers and do (Actions)
-
Loop - Actions
-
Unit - Create 1 Ancestral Builder for (Picked player) at (Center of Builders <gen>) facing Default building facing degrees
-
Selection - Select (Last created unit) for (Picked player)
-
Camera - Pan camera for (Picked player) to (Center of Builders <gen>) over 0.00 seconds
-
-
-
-
Last edited: