chukky-jr
Member
- Reaction score
- 15
Trigger:
- Deep Freeze Ready
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Deep Freeze
- Actions
- Set DeepFreezeIndex[1] = (DeepFreezeIndex[1] + 1)
- Set DeepFreezeIndex[2] = (DeepFreezeIndex[2] + 1)
- Set DeepFreezeSource[DeepFreezeIndex[2]] = (Casting unit)
- Set DeepFreezeSourcePost[DeepFreezeIndex[2]] = (Position of DeepFreezeSource[DeepFreezeIndex[2]])
- Unit Group - Pick every unit in (Units within 1000.00 of DeepFreezeSourcePost[DeepFreezeIndex[2]]) and do (Unit Group - Add (Picked unit) to DeepFreezeUnitGroup[DeepFreezeIndex[2]])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) is A structure) Equal to False
- Then - Actions
- Unit Group - Pick every unit in DeepFreezeUnitGroup[DeepFreezeIndex[2]] and do (Actions)
- Loop - Actions
- Set DeepFreezeCounter[DeepFreezeIndex[2]] = (DeepFreezeCounter[DeepFreezeIndex[2]] + 1)
- Set DeepFreezeHealth[DeepFreezeCounter[DeepFreezeIndex[2]]] = (Life of (Picked unit))
- Set DeepFreezeMana[DeepFreezeCounter[DeepFreezeIndex[2]]] = (Mana of (Picked unit))
- Set DeepFreezeUnit[DeepFreezeCounter[DeepFreezeIndex[2]]] = (Picked unit)
- Loop - Actions
- Unit Group - Pick every unit in DeepFreezeUnitGroup[DeepFreezeIndex[2]] and do (Actions)
- Else - Actions
- If - Conditions
- Set DeepFreezeDuration[DeepFreezeIndex[2]] = (3.00 + (2.00 x (Real((Level of Deep Freeze for DeepFreezeSource[DeepFreezeIndex[2]])))))
- Custom script: call RemoveLocation(udg_DeepFreezeSourcePost[udg_DeepFreezeIndex[2]])
- Trigger - Turn on Deep Freeze Effects <gen>
- Events
Trigger:
- Deep Freeze Effects
- Events
- Time - Every 0.05 seconds of game time
- Unit - A unit Is issued an order with no target
- Conditions
- Actions
- For each (Integer DeepFreezeIndex[3]) from 1 to DeepFreezeIndex[2], do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- DeepFreezeDuration[DeepFreezeIndex[3]] Greater than 0.00
- Then - Actions
- Set DeepFreezeDuration[DeepFreezeIndex[3]] = (DeepFreezeDuration[DeepFreezeIndex[3]] - 0.05)
- Game - Display to (All players) the text: (String(DeepFreezeDuration[DeepFreezeIndex[3]]))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Issued order) Equal to (Order(unimmolation))
- (Ordered unit) Equal to DeepFreezeSource[DeepFreezeIndex[3]]
- Then - Actions
- Set DeepFreezeDuration[DeepFreezeIndex[3]] = 0.00
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- DeepFreezeDuration[DeepFreezeIndex[3]] Equal to 0.00
- Then - Actions
- Unit Group - Pick every unit in DeepFreezeUnitGroup[DeepFreezeIndex[3]] and do (Actions)
- Loop - Actions
- For each (Integer A) from 1 to DeepFreezeCounter[DeepFreezeIndex[3]], do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Picked unit) Equal to DeepFreezeUnit[(Integer A)]
- Then - Actions
- Unit - Set life of (Picked unit) to DeepFreezeHealth[(Integer A)]
- Unit - Set mana of (Picked unit) to DeepFreezeMana[(Integer A)]
- Unit Group - Remove (Picked unit) from DeepFreezeUnitGroup[DeepFreezeIndex[3]]
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to DeepFreezeCounter[DeepFreezeIndex[3]], do (Actions)
- Loop - Actions
- Set DeepFreezeIndex[1] = (DeepFreezeIndex[1] - 1)
- Set DeepFreezeCounter[DeepFreezeIndex[3]] = 0
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- DeepFreezeIndex[1] Equal to 0
- Then - Actions
- Game - Display to (All players) the text: Loop Ends
- Set DeepFreezeIndex[2] = 0
- Trigger - Turn off (This trigger)
- Else - Actions
- If - Conditions
- Unit Group - Pick every unit in DeepFreezeUnitGroup[DeepFreezeIndex[3]] and do (Actions)
- Else - Actions
- If - Conditions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer DeepFreezeIndex[3]) from 1 to DeepFreezeIndex[2], do (Actions)
- Events
basically, the spell is going to store any unit's health and mana in 1000 AoE of caster, and a few seconds later/using the revert form(unimmolation) their health will be returned to stored values
my problem is, only one instance of spell worked, 2 instance does works in counting the duration and ending the loop, but no clue why it doesn't work in restoring the unit's health and mana
any thoughts?