- Joined
- May 20, 2009
- Messages
- 822
EDIT: I am NOT using the actual Shockwave spell, I am using Channel as the "Ability Being Cast" and Shadow Strike to reduce the movement speed of units.
I'm at my wits end here. No matter what I do, it causes a huge amount of lag. I DO KNOW WHY it causes the lag, but I DO NOT KNOW how to fix the lag!
My idea to fix the lag was just make sure that if the amount of times the spell is cast is greater then the amount of units, then the unit is stopped being ordered to cast the spell. But I can't quite figure out how to do that. =\
These are my triggers:
I'm at my wits end here. No matter what I do, it causes a huge amount of lag. I DO KNOW WHY it causes the lag, but I DO NOT KNOW how to fix the lag!
My idea to fix the lag was just make sure that if the amount of times the spell is cast is greater then the amount of units, then the unit is stopped being ordered to cast the spell. But I can't quite figure out how to do that. =\
These are my triggers:
-
Shockwave
-
Events
- Unit - A unit Starts the effect of an ability
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Casting unit)) Equal to Infiltrator
- (Ability being cast) Equal to Shockwave
-
Then - Actions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 400.00 of (Position of (Triggering unit))) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to SWUnitsInRangeGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Picked unit)) Equal to Burrowed Crypt Fiend
- (Unit-type of (Picked unit)) Equal to Arcane Tank (Deployed)
- (Unit-type of (Picked unit)) Equal to Druid of the Claw (Bear Form)
- (Unit-type of (Picked unit)) Equal to Burrowed Carrion Beetle (Level 2)
- (Unit-type of (Picked unit)) Equal to Burrowed Carrion Beetle (Level 3)
- (Unit-type of (Picked unit)) Equal to Stone Form Gargoyle
- (Unit-type of (Picked unit)) Equal to Spirit Walker
-
Conditions
-
Or - Any (Conditions) are true
- Then - Actions
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Set SWGroupSize = (Number of units in SWUnitsInRangeGroup)
- Set SWUnitsAffected = 0
-
Unit Group - Pick every unit in SWUnitsInRangeGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SWUnitsAffected Not equal to SWGroupSize
-
Then - Actions
- Set SWUnitsAffected = (SWUnitsAffected + 1)
- Unit - Create 1 Dummy Shockwave Speed Reduction for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SWUnitsAffected Equal to SWGroupSize
-
Then - Actions
- Set SWUnitsAffected = 0
- Set SWGroupSize = 0
- Unit Group - Remove all units of SWUnitsInRangeGroup from SWUnitsInRangeGroup
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited: