Mythes
Member
- Reaction score
- 7
I have 2 triggers that enable gaining of free gold to players each second, as follows:
This trigger adds every player that is playing to the player group PlayersPlaying, and adds them to PlayerNorth if they are in slot 2 to 5, or to PlayerSouth if they are in slot 7 to 10.
Then I have the free gold / s trigger:
So if 4 players (max number on a team) are playing on the North side, each one gains 1 gold /s. But if only 1 player is playing on the South side, he/she gains 4 gold /s.
My problem is only the first player in each team is gaining the gold...
Any ideas why is this bugging??
I know it's not the "putting the players in the group" because when I play with 2 players on the same team, the first player (not mattering which slot he is on) gains 3 gold /s (5 - 2 = 3), whereas the second player gains nothing.
Just to be sure, I checked with Strings the players that were on each side, and it always answered correctly the number of players and which players were on which side...
If you need more info, or better explanation, please post...
Thanks..
Myt.
Trigger:
- Map Initialization
- Events
- Map initialization
- Conditions
- Actions
- -------- ------------------------------------------------------------------------------------ --------
- -------- Players Norte --------
- -------- ------------------------------------------------------------------------------------ --------
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Player((Integer A))) slot status) Equal to Is playing
- Then - Actions
- Player Group - Add (Player((Integer A))) to PlayersPlaying
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Integer A) Greater than or equal to 2) and ((Integer A) Less than or equal to 5)
- Then - Actions
- Player Group - Add (Player((Integer A))) to PlayersNorth
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Integer A) Greater than or equal to 7) and ((Integer A) Less than or equal to 10)
- Then - Actions
- Player Group - Add (Player((Integer A))) to PlayersSouth
- Else - Actions
- If - Conditions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Events
This trigger adds every player that is playing to the player group PlayersPlaying, and adds them to PlayerNorth if they are in slot 2 to 5, or to PlayerSouth if they are in slot 7 to 10.
Then I have the free gold / s trigger:
Trigger:
- Free Gold
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- Player Group - Pick every player in PlayersNorth and do (Actions)
- Loop - Actions
- Player - Set (Picked player) Current gold to (((Picked player) Current gold) + (5 - (Number of players in PlayersNorth)))
- Loop - Actions
- Player Group - Pick every player in PlayersSouth and do (Actions)
- Loop - Actions
- Player - Set (Picked player) Current gold to (((Picked player) Current gold) + (5 - (Number of players in PlayersSouth)))
- Loop - Actions
- Player Group - Pick every player in PlayersNorth and do (Actions)
- Events
So if 4 players (max number on a team) are playing on the North side, each one gains 1 gold /s. But if only 1 player is playing on the South side, he/she gains 4 gold /s.
My problem is only the first player in each team is gaining the gold...
Any ideas why is this bugging??
I know it's not the "putting the players in the group" because when I play with 2 players on the same team, the first player (not mattering which slot he is on) gains 3 gold /s (5 - 2 = 3), whereas the second player gains nothing.
Just to be sure, I checked with Strings the players that were on each side, and it always answered correctly the number of players and which players were on which side...
If you need more info, or better explanation, please post...
Thanks..
Myt.