- Joined
- Oct 7, 2017
- Messages
- 11
I'm trying to make a trigger that keeps track of a players total value. (current gold+gold cost of each unit he controls.
I set player 1 red = to the player group: player1red in another trigger during map initialization
Now does this leak? is there a better way to do this?
-
PlayerValueHuman
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in player1red and do (Actions)
-
Loop - Actions
- -------- Gold --------
- Set ValuePlayer[(Player number of (Picked player))] = ((Picked player) Current gold)
- -------- Footmen --------
- Set ValueUnitGroup[(Player number of (Picked player))] = (Units owned by (Picked player) of type Footman)
- Set ValuePlayer[(Player number of (Picked player))] = (ValuePlayer[(Player number of (Picked player))] + ((Number of units in ValueUnitGroup[(Player number of (Picked player))]) x 135))
- -------- Peasant --------
- Set ValueUnitGroup[(Player number of (Picked player))] = (Units owned by (Picked player) of type Peasant)
- Set ValuePlayer[(Player number of (Picked player))] = (ValuePlayer[(Player number of (Picked player))] + ((Number of units in ValueUnitGroup[(Player number of (Picked player))]) x 75))
-
Loop - Actions
-
Player Group - Pick every player in player1red and do (Actions)
-
Events
I set player 1 red = to the player group: player1red in another trigger during map initialization
Now does this leak? is there a better way to do this?