Making an MUI spell and I need some help with destroying a lightning effect after 10 seconds without ruining the MUI. Here are the triggers:
It's all working, but I can't think of a MUI way to destroy the lightning effect after 10 seconds (I'm new to making MUI abilities). Any ideas?
In case you're wondering, the cripple ability adds the Tree Siphon buff and nothing else
Thanks,
Flow
Code:
eat tree cast
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Eat Tree
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CustomValue Less than 10
Then - Actions
Set CustomValue = (CustomValue + 1)
Else - Actions
Set CustomValue = 1
Set Tango_Point[CustomValue] = (Position of (Triggering unit))
Set Tango_Point2[CustomValue] = (Target point of ability being cast)
Lightning - Create a Drain Life lightning effect from source Tango_Point[CustomValue] to target Tango_Point2[CustomValue]
Set Tango_Effect[CustomValue] = (Last created lightning effect)
Unit - Create 1 CL_Dummy for (Owner of (Triggering unit)) at Tango_Point[CustomValue] facing Default building facing degrees
Unit Group - Add (Last created unit) to DummyGroup
Unit - Add a 20.00 second Generic expiration timer to (Last created unit)
Unit - Add Cripple to (Last created unit)
Unit - Order (Last created unit) to Undead Necromancer - Cripple (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Tango_Point2[CustomValue] is blighted) Equal to True
Then - Actions
Lightning - Change color of Tango_Effect[CustomValue] to (0.00 0.00 0.00) with 1.00 alpha
Else - Actions
Do nothing
Custom script: call RemoveLocation(udg_Tango_Point[udg_CustomValue])
Custom script: call RemoveLocation(udg_Tango_Point2[udg_CustomValue])
Code:
drain periodic
Events
Time - Every 1.00 seconds of game time
Conditions
(DummyGroup is empty) Equal to False
Actions
Set Tango_Group = (Units in (Playable map area) matching (((Matching unit) has buff Tree Siphon ) Equal to True))
Unit Group - Pick every unit in Tango_Group and do (Unit - Set life of (Picked unit) to (((Life of (Picked unit)) + 15.00) + 1.00))
Custom script: call DestroyGroup(udg_Tango_Group)
It's all working, but I can't think of a MUI way to destroy the lightning effect after 10 seconds (I'm new to making MUI abilities). Any ideas?
In case you're wondering, the cripple ability adds the Tree Siphon buff and nothing else
Thanks,
Flow