- Joined
- Jul 9, 2008
- Messages
- 253
I need help with a spell. It makes the game go laggy when I cast it alot of times, but I can't seem to find the leak. :/
Trigger:
Trigger:
-
Events
-

Unit - A unit Starts the effect of an ability
-
-
Conditions
-

(Ability being cast) Equal to Unholy Revenge
-
-
Actions
-

Set Caster = (Casting unit)
-

Set Owner = (Owner of (Casting unit))
-

Set Point1 = (Target point of ability being cast)
-

Set Real = 0.00
-

Set Integer = 10
-

Set Damage = (5.00 x (Real((Intelligence of Caster (Include bonuses)))))
-

Set Group = (Units within 250.00 of Point1 matching (((Matching unit) belongs to an ally of Owner) Equal to False))
-

Unit Group - Pick every unit in Group and do (Unit - Cause Caster to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Normal)
-

For each (Integer UnholyRevenge) from 1 to Integer, do (Actions)
-


Loop - Actions
-



Unit - Create 1 Dummy - Unholy Revenge for Owner at Point1 facing Default building facing degrees
-



Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-



Set Point2 = (Point1 offset by 250.00 towards Real degrees)
-



Unit - Order (Last created unit) to Move To Point2
-



Set Real = (Real + 36.00)
-



Custom script: call RemoveLocation(udg_Point2)
-
-
-

Custom script: call RemoveLocation(udg_Point1)
-

Custom script: call GroupClear(udg_Group)
-




