- Joined
- May 7, 2016
- Messages
- 2,176
Well, I want my Acolytes gather 20 gold instead of 10 from the gold mine. Here is what I tried but it seems it doesn't work.
There must be some problem with it but I could not find any. So, anyone knows?
-
Gold Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Gather (Acolyte Gold)
-
-
Actions
-
Set GOLD_INDEX = (GOLD_INDEX + 1)
-
-------- --------
-
Set GOLD_CASTER[GOLD_INDEX] = (Triggering unit)
-
Set GOLD_OWNER[GOLD_INDEX] = (Triggering player)
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GOLD_INDEX Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Gold Loop <gen>
-
-
Else - Actions
-
-
-
-
Gold Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
-------- --------
-
-------- This trigger must be intially off --------
-
-------- --------
-
For each (Integer GOLD_LOOP) from 1 to GOLD_INDEX, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GOLD_OWNER[GOLD_LOOP] Equal to Player 1 (Red)
-
-
Then - Actions
-
Player - Add 10 to GOLD_OWNER[GOLD_LOOP] Current gold
-
-
Else - Actions
-
-
-------- --------
-
-------- Recycling --------
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current order of GOLD_CASTER[GOLD_LOOP]) Not equal to (Order(harvest))
-
-
Then - Actions
-
Set GOLD_CASTER[GOLD_INDEX] = GOLD_CASTER[GOLD_LOOP]
-
Set GOLD_OWNER[GOLD_INDEX] = GOLD_OWNER[GOLD_LOOP]
-
Set GOLD_INDEX = (GOLD_INDEX - 1)
-
Set GOLD_LOOP = (GOLD_LOOP - 1)
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GOLD_INDEX Equal to 0
-
-
Then - Actions
-
-------- Debug msg --------
-
Game - Display to (All players) the text: SPELL HAS ENDED
-
-------- --------
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-