N
Nikolae
Guest
Ok guys, I'm making this trigger-based heal over time spell, but I had to work it out to use two triggers. It will work for a couple casts, but then it just stops working... Help!
Trigger 1 sets the variables used in Trigger 2.
Trigger 2 runs the heal effect for all current instances of 'Renew' running.
~Nik
Trigger 1 sets the variables used in Trigger 2.
Code:
Renew Init
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Renew
Actions
If (RenewKey Equal to 50) then do (Set RenewKey = 0) else do (Do nothing)
Set RenewKey = (RenewKey + 1)
Set RenewActive[RenewKey] = True
Set RenewTarget[RenewKey] = (Target unit of ability being cast)
Set RenewTick[RenewKey] = 0
Set SpellLVL = (Level of (Ability being cast) for (Casting unit))
Set SpellReal = ((Real((Intelligence of (Casting unit) (Include bonuses)))) x (Real(SpellLVL)))
Trigger - Run Spell Crit <gen> (checking conditions)
Set SpellReal = (SpellReal / 15.00)
Set RenewHealValue[RenewKey] = (Integer(SpellReal))
Trigger 2 runs the heal effect for all current instances of 'Renew' running.
Code:
Renew Action
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 50, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RenewActive[(Integer A)] Equal to False
Then - Actions
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RenewTick[(Integer A)] Greater than or equal to 15
Then - Actions
Set RenewActive[(Integer A)] = False
Else - Actions
Unit - Set life of RenewTarget[(Integer A)] to ((Life of RenewTarget[(Integer A)]) + (Real(RenewHealValue[(Integer A)])))
Floating Text - Create floating text that reads (String(RenewHealValue[(Integer A)])) above RenewTarget[(Integer A)] with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Change the lifespan of (Last created floating text) to 1.00
Floating Text - Change the fadepoint of (Last created floating text) to 0.50
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Set RenewTick[(Integer A)] = (RenewTick[(Integer A)] + 1)
~Nik


