- Joined
- Jan 30, 2013
- Messages
- 12,759
So, my spell is supposed to loop the timer as to how a timer should. However, this particular spell for some reason instantly loops till 0 in less than a second span (while the ability is supposed to be about 10 seconds at the first level). I have debugged triggers to show the issue that allows me to get this conclusion. I use patch 1.31 for this particular work.
The TSE is based on a to-be-uploaded patch of Timed Spell Effect [Patch 10] (the one on the map is patch 12). I attached the test map below. Before recommending me to switch to a countdown timer, I already tried using a countdown timer with the same result. Also, TSE logic is very similar to this, so TSE should've bugged out if this bugs out, but the test map shows it does not.
I'll be more than happy to share spell ownership to anyone who can find the core cause, as this frustrates me and my spell making targets.
-
FShield Config
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- Shield Ability --------
-
Set FShieldAbility = Blizzard
-
-------- Shield Duration --------
-
Set FShieldDuration[1] = 10.00
-
Set FShieldDuration[2] = 20.00
-
Set FShieldDuration[3] = 30.00
-
-------- Shield Effect --------
-
Set FShieldEffectName = Ubershield/Ubershield Cosmic.mdx
-
-------- Shield Range --------
-
Set FShieldRange[1] = 600.00
-
Set FShieldRange[2] = 800.00
-
Set FShieldRange[3] = 1000.00
-
-------- Shield Scale --------
-
Set FShieldScale[1] = 7.00
-
Set FShieldScale[2] = 9.00
-
Set FShieldScale[3] = 11.00
-
-------- Shield Filter --------
-
Set FShieldFilterTrigger = FShield Filter <gen>
-
-------- Shield Loop --------
-
Set FShieldLoopTrigger = FShield Loop <gen>
-
-------- Loop Timeout --------
-
Set TSETimeout = 0.03
-
-------- DO NOT TOUCH --------
-
Custom script: call DestroyGroup(udg_FShieldGroup[0])
-
Custom script: call DestroyGroup(udg_FShieldGroup[1])
-
Trigger - Add to FShieldLoopTrigger the event (Time - Every FShieldTimeout seconds of game time)
-
-
-
FShield Start
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to FShieldAbility
-
-
Actions
-
-------- Core Data --------
-
Set FShieldMaxIndex = (FShieldMaxIndex + 1)
-
Set FShieldCaster = (Triggering unit)
-
Set FShieldLevel = (Level of FShieldAbility for FShieldCaster)
-
Set FShieldPoint = (Target point of ability being cast)
-
-------- Spell Effect --------
-
Set FShieldDurationRemaining[FShieldMaxIndex] = FShieldDuration[FShieldLevel]
-
Set FShieldGroup[FShieldMaxIndex] = (Units within FShieldRange[FShieldLevel] of FShieldPoint)
-
Unit Group - Pick every unit in FShieldGroup[FShieldMaxIndex] and do (Actions)
-
Loop - Actions
-
Set FShieldTargetUnit = (Picked unit)
-
Set FShieldFilterPass = False
-
Trigger - Run FShieldFilterTrigger (checking conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
FShieldFilterPass Equal to True
-
-
Then - Actions
-
Unit - Make FShieldTargetUnit Invulnerable
-
-
Else - Actions
-
Unit Group - Remove FShieldTargetUnit from FShieldGroup[FShieldMaxIndex]
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
FShieldMaxIndex Equal to 1
-
-
Then - Actions
-
Trigger - Turn on FShieldLoopTrigger
-
-
Else - Actions
-
-
-------- Shield SFX --------
-
Set TSEPoint = (Target point of ability being cast)
-
Set TSEDuration = FShieldDuration[FShieldLevel]
-
Set TSEEffectName = FShieldEffectName
-
Set TSEScale = FShieldScale[FShieldLevel]
-
Trigger - Run TSERegister (checking conditions)
-
-
-
FShield Filter
-
Events
-
Conditions
-
(FShieldTargetUnit is A structure) Equal to True
-
(FShieldTargetUnit belongs to an ally of (Owner of FShieldCaster)) Equal to True
-
(Level of Invulnerable (Neutral) for FShieldTargetUnit) Equal to 0
-
-
Actions
-
Set FShieldFilterPass = True
-
-
-
FShield Loop
-
Events
-
Conditions
-
Actions
-
For each (Integer FShieldIndex) from 1 to FShieldMaxIndex, do (Actions)
-
Loop - Actions
-
Set FShieldDurationRemaining[FShieldIndex] = (FShieldDurationRemaining[FShieldIndex] - TSETimeout)
-
Game - Display to (All players) the text: (String(FShieldDurationRemaining[FShieldIndex]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
FShieldDurationRemaining[FShieldIndex] Less than or equal to 0.00
-
-
Then - Actions
-
Game - Display to (All players) the text: Instance Over
-
Unit Group - Pick every unit in FShieldGroup[FShieldIndex] and do (Actions)
-
Loop - Actions
-
Unit - Make FShieldTargetUnit Vulnerable
-
-
-
Custom script: call DestroyGroup(udg_FShieldGroup[udg_FShieldIndex])
-
Set FShieldDurationRemaining[FShieldIndex] = FShieldDurationRemaining[FShieldMaxIndex]
-
Set FShieldGroup[FShieldIndex] = FShieldGroup[FShieldMaxIndex]
-
Set FShieldIndex = (FShieldIndex - 1)
-
Set FShieldMaxIndex = (FShieldMaxIndex - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
FShieldMaxIndex Equal to 0
-
-
Then - Actions
-
Game - Display to (All players) the text: No Instance Found
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
The TSE is based on a to-be-uploaded patch of Timed Spell Effect [Patch 10] (the one on the map is patch 12). I attached the test map below. Before recommending me to switch to a countdown timer, I already tried using a countdown timer with the same result. Also, TSE logic is very similar to this, so TSE should've bugged out if this bugs out, but the test map shows it does not.
I'll be more than happy to share spell ownership to anyone who can find the core cause, as this frustrates me and my spell making targets.