- Joined
- Mar 13, 2009
- Messages
- 1,411
I was working on a spell using this trigger:
When I use this spell a few times it gets extremely laggy, but I can't see where it would create the lag.
-
Static
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Static
-
Actions
- Set TempLoc = (Position of (Target unit of ability being cast))
- Set TempGroup = (Units within ((200.00 + 100.00) x (Real((Level of Static for (Triggering unit))))) of TempLoc)
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
- Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
- Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True
-
Then - Actions
- Unit - Add Static (Heal) to (Last created unit)
- Unit - Set level of Static (Heal) for (Last created unit) to (Level of Static for (Triggering unit))
- Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave (Picked unit)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
-
Then - Actions
- Unit - Add Static (Damage) to (Last created unit)
- Unit - Set level of Static (Damage) for (Last created unit) to (Level of Static for (Triggering unit))
- Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Loop - Actions
- Custom script: call RemoveLocation(udg_TempLoc)
- Custom script: call DestroyGroup (udg_TempGroup)
-
Events
When I use this spell a few times it gets extremely laggy, but I can't see where it would create the lag.