- Joined
- Dec 22, 2007
- Messages
- 103
Recently I got help creating a fire Shield Trigger, and after several helpful threads I created this ability:
receiving the Fire Shield ability, which oddly always caused a full mana flush
on the unit it was given to. Now the issue is whenever its cast on another
unit while the buff for the first unit is still active, the variable FireShieldTarget
changes and the first target won't lose the ability after its buff runs out.
The second target also loses the ability after the first target's buff runs out
rather than its own buff.
-
Fire Shield
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Fire Shield
-
-
Actions
-
Set Daemon = (Triggering unit)
-
Set FireShieldTarget = (Target unit of ability being cast)
-
Wait 0.50 seconds
-
Unit - Add Fire Shield (Bundle) to FireShieldTarget
-
Unit - Set level of Fire Shield (Effect) for FireShieldTarget to (Level of Fire Shield for Daemon)
-
Unit - Set level of Fire Shield Armor for FireShieldTarget to (Level of Fire Shield for Daemon)
-
Unit - Set mana of FireShieldTarget to TargetMana
-
Unit Group - Add FireShieldTarget to FireShieldTargets
-
Trigger - Turn on Fire Shield Targets <gen>
-
-
-
Fire Shield Targets
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in FireShieldTargets and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Fire Shield (Armor)) Equal to False
-
-
Then - Actions
-
Unit - Remove Fire Shield (Bundle) from FireShieldTarget
-
Unit Group - Remove (Picked unit) from FireShieldTargets
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(FireShieldTargets is empty) Equal to True
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
-
Mana Save
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
Set TargetMana = (Mana of FireShieldTarget)
-
-
receiving the Fire Shield ability, which oddly always caused a full mana flush
on the unit it was given to. Now the issue is whenever its cast on another
unit while the buff for the first unit is still active, the variable FireShieldTarget
changes and the first target won't lose the ability after its buff runs out.
The second target also loses the ability after the first target's buff runs out
rather than its own buff.
Last edited: