HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with leaking and laggy spell

10-14-2006, 06:46 AM#1
Shade987
so, I'm making a spell for my aos. This spell is supposed to randomly kill nearby units when it is cast and slow those that aren't killed as well as heroes by 50%.

There's also supposed to be a visual that is an expanding ring of bursts. This is the laggy part of the spell. Also, there seems to be a leak somewhere, because it's laggier after I cast the spell.

So I'm wondering if someone could point out where the leak is and tell me how I might fix it.

Trigger:
Arigoths Judgement
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Arigoth's Judgement
Collapse Actions
Set JudgementPosition = (Position of (Casting unit))
Set JudgementCaster = (Casting unit)
Trigger - Turn on Arigoths Judgment Effect <gen>
Collapse Unit Group - Pick every unit in (Units within 750.00 of (Position of (Casting unit)) matching (((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A Hero) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))) and (( and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Random integer number between 1 and 100) Less than or equal to 35
Collapse Then - Actions
Unit - Cause (Casting unit) to damage (Picked unit), dealing 1000000000.00 damage of attack type Chaos and damage type Normal
Collapse Else - Actions
Unit - Create 1 Dummy (For Spell Effects) for (Owner of (Casting unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Judgement (Neutral Hostile) to (Last created unit)
Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
Collapse Unit Group - Pick every unit in (Units within 750.00 of (Position of (Casting unit)) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))) and do (Actions)
Collapse Loop - Actions
Unit - Create 1 Dummy (For Spell Effects) for (Owner of (Casting unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Judgement (Neutral Hostile) to (Last created unit)
Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
Countdown Timer - Start JudgementTimer as a Repeating timer that will expire in 0.15 seconds


Trigger:
Arigoths Judgment Effect
Collapse Events
Time - JudgementTimer expires
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
JudgmentCounter Less than 750.00
Collapse Then - Actions
Set JudgmentCounter = (JudgmentCounter + 1.00)
Collapse For each (Integer A) from 1 to 20, do (Actions)
Collapse Loop - Actions
Unit - Create 1 Dummy (For Spell Effects) for (Owner of JudgementCaster) at JudgementPosition facing Default building facing degrees
Unit - Add Judgement Dummy to (Last created unit)
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Neutral - Monsoon (JudgementPosition offset by (JudgmentCounter x 50.00) towards ((Real((Integer A))) x ((360.00 / 36.00) x 2.00)) degrees)
Collapse Else - Actions
Trigger - Turn off (This trigger)
Set JudgementCaster = No unit
Countdown Timer - Pause JudgementTimer
Set JudgmentCounter = 0.00
Custom script: call RemoveLocation(udg_JudgementPosition)