- Joined
- Apr 15, 2020
- Messages
- 61
I have this ability that can be cast by multiple buildings. The ability works fine when cast by the first unit with custom value of 0 but units don't seem to pick up and added to the correct group.
Can anyone help with why this loop doesn't function past the first iteration?
Can anyone help with why this loop doesn't function past the first iteration?
-
MC Periodic
-

Events
-


Time - Every 0.50 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer ConduitLoop) from 0 to 100, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






(Mana of ConduitCaster[ConduitLoop]) Less than 5.00
-
-





Then - Actions
-






Unit - Order ConduitCaster[ConduitLoop] to Stop.
-
-





Else - Actions
-






Unit - Set mana of ConduitCaster[ConduitLoop] to ((Mana of ConduitCaster[ConduitLoop]) - 3.00)
-






Unit Group - Pick every unit in (Units within ConduitAoE of ConduitPoint[ConduitLoop] matching ((Owner of (Matching unit)) Equal to Player 1 (Red)).) and do (Actions)
-







Loop - Actions
-








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









If - Conditions
-










And - All (Conditions) are true
-











Conditions
-












(Mana of (Picked unit)) Less than (Max mana of (Picked unit))
-












((Picked unit) is alive) Equal to True
-
-
-
-









Then - Actions
-










Unit Group - Add (Picked unit) to AcaneConduit_Target[ConduitLoop]
-
-









Else - Actions
-
-
-
-






Unit Group - Pick every unit in AcaneConduit_Target[ConduitLoop] and do (Actions)
-







Loop - Actions
-








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









If - Conditions
-










(Percentage mana of (Picked unit)) Equal to 100.00
-










((Picked unit) is alive) Equal to False
-










(Distance between (Position of (Picked unit)) and ConduitPoint[ConduitLoop]) Greater than 250.00
-
-









Then - Actions
-










Unit Group - Remove (Picked unit) from AcaneConduit_Target[ConduitLoop].
-
-









Else - Actions
-










Set VariableSet Conduit_Count[ConduitLoop] = (Number of units in AcaneConduit_Target[ConduitLoop])
-










Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + (2.00 + (1.00 x (Real((Current research level of Greater Conduit for Player 1 (Red)))))))
-
-
-
-
-






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







If - Conditions
-








Conduit_Count[ConduitLoop] Greater than 0
-
-







Then - Actions
-








Unit - Set mana of ConduitCaster[ConduitLoop] to ((Mana of ConduitCaster[ConduitLoop]) - (0.00 + (1.00 x (Real(Conduit_Count[ConduitLoop])))))
-
-







Else - Actions
-








Do nothing
-
-
-
-
-
-
-
-
Last edited:



