- Joined
- Apr 23, 2011
- Messages
- 460
I'm not sure where to post this, I'm hoping this is it. I made a system for gold per second upgradable buildings/ units if chosen to do so. The system is modeled after "Troll and Elves" House system. Here is the system:
Variables: Gold(Integer), UnitType(Unit-Type), temp_Loc(Point).
-
Setup
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- Gold Amount Given Every [Time] --------
-


Set Gold[1] = 1
-


Set Gold[2] = 2
-


Set Gold[3] = 4
-


Set Gold[4] = 8
-


Set Gold[5] = 16
-


Set Gold[6] = 32
-


Set Gold[7] = 64
-


Set Gold[8] = 128
-


Set Gold[9] = 256
-


Set Gold[10] = 512
-


-------- Units and their Upgrades. Corespond to Gold --------
-


Set UnitType[1] = Base Unit
-


Set UnitType[2] = Upgrade1
-


Set UnitType[3] = Upgrade2
-


Set UnitType[4] = Upgrade3
-


Set UnitType[5] = Upgrade4
-


Set UnitType[6] = Upgrade5
-


Set UnitType[7] = Upgrade6
-


Set UnitType[8] = Upgrade7
-


Set UnitType[9] = Upgrade8
-


Set UnitType[10] = Upgrade9
-
-
-
Give gold
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


Custom script: set bj_wantDestroyGroup = true
-


Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-



Loop - Actions
-




For each (Integer A) from 1 to 10, do (Actions)
-





Loop - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Unit-type of (Picked unit)) Equal to UnitType[(Integer A)]
-
-







Then - Actions
-








Set temp_Loc = (Position of (Picked unit))
-








Player - Add Gold[(Integer A)] to (Owner of (Picked unit)) Current gold
-








Floating Text - Create floating text that reads (+ + (String(Gold[(Integer A)]))) at temp_Loc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-








Floating Text - Change (Last created floating text): Disable permanence
-








Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-








Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
-








Custom script: call RemoveLocation(udg_tempLoc)
-
-







Else - Actions
-
-
-
-
-
-
-









