- Joined
- May 20, 2009
- Messages
- 821
Need help with this custom Harvest system
Having some huge leaks in here and I can't quite find them.
EDIT: It may be the last trigger, but stay tuned as there's bound to be A LOT more, not to mention it's nice to see if there's anything else I need to fix. (Especially since I'm highly considering submitting this)
EDIT2: Okay so now I can't get the second ITE to function. . .The conditions are not the issue, as I put some text to display there and it displays.
Having some huge leaks in here and I can't quite find them.
-
Ordered To Mine
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-

Actions
-


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



If - Conditions
-




(Unit-type of (Triggering unit)) Equal to Peasant
-
-



Then - Actions
-




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





If - Conditions
-






(Ability being cast) Equal to Harvest
-
-





Then - Actions
-






Unit - Add Peasant Morph to (Triggering unit)
-






Selection - Remove (Triggering unit) from selection for (Owner of (Triggering unit))
-






Animation - Play Gold Mine 0013 <gen>'s work animation
-






Set __GS_GoldHarvestMaxIndex = (__GS_GoldHarvestMaxIndex + 1)
-






Set __GS_GoldHarvestingUpdate[__GS_GoldHarvestMaxIndex] = 1
-






Set __GS_TargetMine[__GS_GoldHarvestMaxIndex] = (Target unit of ability being cast)
-






Set __GS_GoldHarvestTimer[__GS_GoldHarvestMaxIndex] = 0
-






Set __GS_GoldHarvestUnit[__GS_GoldHarvestMaxIndex] = (Triggering unit)
-






Set __GS_GoldHarvestUnitPoint[__GS_GoldHarvestMaxIndex] = (Position of __GS_GoldHarvestUnit[__GS_GoldHarvestMaxIndex])
-
-





Else - Actions
-
-
-



Else - Actions
-
-
-
-
Timer Order Return
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer __GS_GoldHarvestMaxIndex) from 1 to __GS_GoldHarvestInit, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






__GS_GoldHarvestingUpdate[__GS_GoldHarvestInit] Equal to 1
-






__GS_GoldHarvestTimer[__GS_GoldHarvestInit] Less than 67
-
-





Then - Actions
-






Set __GS_GoldHarvestTimer[__GS_GoldHarvestInit] = (__GS_GoldHarvestTimer[__GS_GoldHarvestInit] + 1)
-






Selection - Remove __GS_GoldHarvestUnit[__GS_GoldHarvestInit] from selection
-
-





Else - Actions
-
-




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





If - Conditions
-






__GS_GoldHarvestingUpdate[__GS_GoldHarvestInit] Equal to 1
-






__GS_GoldHarvestTimer[__GS_GoldHarvestInit] Equal to 66
-
-





Then - Actions
-






Unit - Remove Peasant Morph from __GS_GoldHarvestUnit[__GS_GoldHarvestInit]
-






Unit - Add Peasant Remorph to __GS_GoldHarvestUnit[__GS_GoldHarvestInit]
-
-





Else - Actions
-
-




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





If - Conditions
-






__GS_GoldHarvestingUpdate[__GS_GoldHarvestInit] Equal to 1
-






__GS_GoldHarvestTimer[__GS_GoldHarvestInit] Equal to 67
-
-





Then - Actions
-






Set __GS_GoldHarvestingUpdate[__GS_GoldHarvestInit] = 0
-






Animation - Add the gold animation tag to __GS_GoldHarvestUnit[__GS_GoldHarvestInit]
-






Animation - Play Gold Mine 0013 <gen>'s stand animation
-






Neutral Building - Add -100 gold to Gold Mine 0013 <gen>
-






Unit - Remove Peasant Remorph from __GS_GoldHarvestUnit[__GS_GoldHarvestInit]
-






Unit - Add Return Resources to __GS_GoldHarvestUnit[__GS_GoldHarvestInit]
-






Unit - Remove Harvest from __GS_GoldHarvestUnit[__GS_GoldHarvestInit]
-






Custom script: set bj_wantDestroyGroup = true
-






Unit Group - Pick every unit in (Units within 8192.00 of __GS_GoldHarvestUnitPoint[__GS_GoldHarvestInit]) and 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 __GS_ReturnSource[__GS_GoldHarvestInit]
-
-









Then - Actions
-










Unit - Order GoldReturningUnit to Neutral Alchemist - Transmute (Picked unit)
-










Custom script: call RemoveLocation(udg___GS_GoldHarvestUnitPoint[udg___GS_GoldHarvestInit])
-
-









Else - Actions
-
-
-
-






Set __GS_GoldHarvestUnit[__GS_GoldHarvestInit] = No unit
-
-





Else - Actions
-
-
-
-
-
-
HarvesterDontIdle
-

Events
-


Time - Every 0.00 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer __GS_GoldHarvestInit) from 1 to __GS_GoldHarvestMaxIndex, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






__GS_GoldHarvestingUpdate[__GS_GoldHarvestInit] Equal to 1
-






__GS_GoldHarvestTimer[__GS_GoldHarvestInit] Less than 67
-
-





Then - Actions
-






Unit - Order __GS_GoldHarvestUnit[__GS_GoldHarvestInit] to Undead Crypt Fiend - Web __GS_TargetMine[__GS_GoldHarvestInit]
-
-





Else - Actions
-
-




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





If - Conditions
-






GoldReturningUpdate Equal to 1
-






GoldReturnedTimer Less than 67
-
-





Then - Actions
-






Custom script: set bj_wantDestroyGroup = true
-






Unit Group - Pick every unit in (Units within 8192.00 of __GS_GoldHarvestUnitPoint[__GS_GoldHarvestInit]) and 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 __GS_ReturnSource[__GS_GoldHarvestInit]
-
-









Then - Actions
-










Unit - Order GoldReturningUnit to Neutral Alchemist - Transmute (Picked unit)
-










Custom script: call RemoveLocation(udg___GS_GoldHarvestUnitPoint[udg___GS_GoldHarvestInit])
-
-









Else - Actions
-
-
-
-
-





Else - Actions
-
-
-
-
-
EDIT: It may be the last trigger, but stay tuned as there's bound to be A LOT more, not to mention it's nice to see if there's anything else I need to fix. (Especially since I'm highly considering submitting this)
EDIT2: Okay so now I can't get the second ITE to function. . .The conditions are not the issue, as I put some text to display there and it displays.
Last edited:




