- Joined
- May 20, 2009
- Messages
- 822
So, there appears to be more lag issues with this spell. This is the last time I'm going to deal with it and if I can't fix it now then it won't be worth using. It lags still even if it's just 1-2 units being "Detected" although it's such a small amount that it's almost unnoticeable. But when it starts to get to 6, 10, 15 units being detected, there is an EXTREMELY noticeable slow down.
Here are the triggers:
Here are the triggers:
-
Sensing Unit Enters
-
Events
-
Unit - A unit enters (Playable map area)
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Archer
-
-
Then - Actions
-
Set SenseUnitMaxIndex = (SenseUnitMaxIndex + 1)
-
Set SenseUnit[SenseUnitMaxIndex] = (Entering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Sense Calc <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Sense Calc <gen>
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Sensing Unit Dies
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Unit-type of (Dying unit)) Equal to Archer
-
-
Actions
-
For each (Integer SenseUnitDiesInit) from 1 to SenseUnitMaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to SenseUnit[SenseUnitDiesInit]
-
-
Then - Actions
-
Set SenseUnit[SenseUnitDiesInit] = SenseUnit[SenseUnitMaxIndex]
-
Set SenseUnit[SenseUnitMaxIndex] = No unit
-
Set SenseUnitPoint[SenseUnitDiesInit] = SenseUnitPoint[SenseUnitMaxIndex]
-
Set SenseRange[SenseUnitDiesInit] = SenseRange[SenseUnitMaxIndex]
-
Set SenseRange[SenseUnitMaxIndex] = 0.00
-
Custom script: set udg_SenseUnitPoint[udg_SenseUnitMaxIndex] = null
-
Set SenseUnitMaxIndex = (SenseUnitMaxIndex - 1)
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Sense Calc <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Sense Calc <gen>
-
-
Else - Actions
-
-
-
-
Sense Calc
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer SenseInit) from 1 to SenseUnitMaxIndex, do (Actions)
-
Loop - Actions
-
Set SenseUnitPoint[SenseInit] = (Position of SenseUnit[SenseInit])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Sense for SenseUnit[SenseInit]) Equal to 1
-
-
Then - Actions
-
Set SenseRange[SenseInit] = 1200.00
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Sense for SenseUnit[SenseInit]) Equal to 2
-
-
Then - Actions
-
Set SenseRange[SenseInit] = 1700.00
-
-
Else - Actions
-
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within SenseRange[SenseInit] of SenseUnitPoint[SenseInit]) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Sense ) Equal to True
-
((Picked unit) is A structure) Equal to False
-
((Picked unit) is alive) Equal to True
-
((Picked unit) belongs to an ally of (Owner of SenseUnit[SenseInit])) Equal to False
-
((Picked unit) is A structure) Equal to False
-
Or - Any (Conditions) are true
-
Conditions
-
((Picked unit) belongs to an enemy of (Owner of SenseUnit[SenseInit])) Equal to True
-
(Owner of (Picked unit)) Equal to Neutral Hostile
-
(Owner of (Picked unit)) Equal to Neutral Victim
-
(Owner of (Picked unit)) Equal to Neutral Extra
-
(Owner of (Picked unit)) Equal to Neutral Passive
-
-
-
-
Then - Actions
-
Set SensedPointMaxIndex = (SensedPointMaxIndex + 1)
-
Set SensedUnit[SensedPointMaxIndex] = (Picked unit)
-
Set SensedUnitPoint[SensedPointMaxIndex] = (Position of SensedUnit[SenseInit])
-
Unit - Create 1 Dummy Sense Unit for (Owner of SenseUnit[SenseInit]) at SensedUnitPoint[SenseInit] facing SensedUnitPoint[SenseInit]
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Custom script: call RemoveLocation(udg_SensedUnitPoint[udg_SenseInit])
-
Set SensedUnitPoint[SenseInit] = SensedUnitPoint[SensedPointMaxIndex]
-
Custom script: set udg_SensedUnitPoint[udg_SensedPointMaxIndex] = null
-
Set SensedUnit[SenseInit] = SensedUnit[SensedPointMaxIndex]
-
Set SensedUnit[SensedPointMaxIndex] = No unit
-
Set SensedPointMaxIndex = (SensedPointMaxIndex - 1)
-
-
Else - Actions
-
-
-
-
-
-
-