So a super short snippet of my script looks like this so far:
Spoiler
if (PlayerRef.HasMagicEffect(T0FocusState4)) ;Check for current tier of the "Focus" spellUtility.Wait(15)if PlayerRef.GetSitState() == 3 ;Makes sure the player is sitting before casting the appropriate "Focus" spell, in this case, recasting the existing since it's the highest tier.T0FocusState4Spell.Cast(PlayerRef)Debug.Notification("Focus State 4 Spell Renewed")EndIfelseif (PlayerRef.HasMagicEffect(T0FocusState3))Utility.Wait(10)if PlayerRef.GetSitState() == 3PlayerRef.DispelSpell(T0FocusState3Spell)T0FocusState4Spell.Cast(PlayerRef)Debug.Notification("Entered Focus State 4 from State 3")EndIf
My problem would be introduced if the player got up during one of the longer wait functions, the 15 second one for example, being the longest, and then reused the power, they'd be back in a sitstate, the script refires and then there are two instances of it rolling with each one showing true for getsitstate.
I toyed with using a bool, that shows false when my OnUpdate event gets cleans up the sitting down process, but that works the exact same way.
So I guess my question is really, can I tell this script to just stop completely in the OnUpdate event? Since that'd just interrupt the functions right?