i need help with this spell if u know how to fix the leaks etc...
-
begin
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Lightning Sword
-
Actions
- Set lightning_sword_caster = (Casting unit)
- Set lightning_caster_point = (Position of lightning_sword_caster)
- Set lightning_sword_point = (Target point of ability being cast)
- Special Effect - Create a special effect attached to the weapon of (Casting unit) using <Empty String>
- Set Caster_effect = (Last created special effect)
- Wait 0.50 seconds
- Special Effect - Destroy (Last created special effect)
- Trigger - Turn on loop <gen>
- Wait 50.00 seconds
- Custom script: call RemoveLocation(udg_lightning_sword_point)
- Custom script: call RemoveLocation(udg_lightning_caster_point)
- Trigger - Turn off loop <gen>
-
Events
-
stop1
-
Events
- Unit - A unit Stops casting an ability
-
Conditions
- (Ability being cast) Equal to Lightning Sword
-
Actions
- Trigger - Turn off loop <gen>
-
Events
-
stop2
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Lightning Sword
-
Actions
- Trigger - Turn off loop <gen>
-
Events
-
loop
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
- Special Effect - Create a special effect attached to the weapon of lightning_sword_caster using <Empty String>
- Set Caster_effect = (Last created special effect)
- Set lightning_sword_group = (Units in (Region centered at lightning_sword_point with size (425.00, 425.00)) matching (((Matching unit) belongs to an enemy of (Owner of lightning_sword_caster)) Equal to True))
- Unit - Create 1 Dummy Unit Lightning SWORD for (Owner of lightning_sword_caster) at lightning_caster_point facing Default building facing degrees
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Random unit from lightning_sword_group)
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Custom script: call DestroyGroup(udg_lightning_sword_group)
- Wait 0.40 seconds
- Special Effect - Destroy Caster_effect
-
Events