Code:
Surge
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Surge
Actions
Set SurgeCaster = (Triggering unit)
Set SurgeTargets = (Units within 700.00 of (Position of (Triggering unit)))
Unit Group - Pick every unit in SurgeTargets and do (Actions)
Loop - Actions
Unit - Create 1 Dummy unit for (Owner of SurgeCaster) at (Position of SurgeCaster) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Surge (dummy) to (Last created unit)
Unit - Set level of Surge (dummy) for (Last created unit) to (Level of Surge for SurgeCaster)
Unit - Order (Last created unit) to Neutral - Hurl Boulder (Picked unit)
Custom script: call DestroyGroup(udg_SurgeTargets)
The move fires water things at the opponents, stunning and damaging them.
I thought i had all the leaks cleared, but when i tested it it started lagging the more i used the spell.
Can anyone see any leaks i havnt cleared up?
Cheers