- Joined
- Jul 13, 2006
- Messages
- 140
So this has been making my head hurt for quite a while.
I'm trying to figure out how to do a mana-based income system and also adding a cap to the maximum amount of a specific resource (gold or lumber) to all players.
And, as I've already mentioned, I also need help in making a system that limits a player to say...200g but if they have like some storage structure they can get a maximum of 250g and if they have 2 storage facilities then 300g and so on.
Any help (or, well, help that's helpful) is greatly appreciated.
And if the loose their storage facilities they loose 50g for each.
I'm trying to figure out how to do a mana-based income system and also adding a cap to the maximum amount of a specific resource (gold or lumber) to all players.
-
income experiment
-
Events
-
Time - Every 60.00 seconds of game time
-
-
Conditions
-
Actions
-
Sound - Play GoodJob <gen>
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
-------- These two are irrelevant to the main point --------
-
Set TempGroup = (Units owned by (Player((Integer A))) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Territory)))
-
Player - Add (Number of units in TempGroup) to (Player((Integer A))) Current gold
-
Custom script: call DestroyGroup(udg_TempGroup)
-
Set TempGroup = (Units owned by (Player((Integer A))) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Factory)))
-
Player - Add (Number of units in TempGroup) to (Player((Integer A))) Current gold
-
Custom script: call DestroyGroup(udg_TempGroup)
-
-------- This is the actual trigger, or well an example --------
-
Set TempGroup = (Units owned by (Player((Integer A))) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Some Unit)))
-
Player - Add ((Number of units in TempGroup) x 1) to (Player((Integer A))) Current gold
-
Custom script: call DestroyGroup(udg_TempGroup)
-
Set TempGroup = (Units owned by (Player((Integer A))) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Some other Unit)))
-
Player - Add ((Number of units in TempGroup) x 1) to (Player((Integer A))) Current gold
-
Custom script: call DestroyGroup(udg_TempGroup)
-
-
-
-
And, as I've already mentioned, I also need help in making a system that limits a player to say...200g but if they have like some storage structure they can get a maximum of 250g and if they have 2 storage facilities then 300g and so on.
Any help (or, well, help that's helpful) is greatly appreciated.
And if the loose their storage facilities they loose 50g for each.