OnTriggerEnter & OnTriggerLeave lag worries

Post » Thu Jul 03, 2014 3:04 am

Guys I'm creating a system that knows which special area the player is currently in by using triggers. No IsInTrigger function exists so I'm setting a property in my overall region quest script that sends the current trigger to the script, and then removes that trigger when leaving. Basically:

Event OnTriggerEnter(ObjectReference akActionRef)	RegionScript.AnimalDen = Self as ObjectReference	RegionScript.IsNearAnimalDen = TrueEndEventEvent OnTriggerLeave(ObjectReference akActionRef)	RegionScript.AnimalDen = none	RegionScript.IsNearAnimalDen = falseEndEvent

My worry is that if the player enters/leaves the trigger area quickly and in quick succession, and then having the possibility of script lag, that the property will get stuck on True when it shouldn't be so. Is it possible for this to happen, or will the Leave event always fire consistently, regardless of how long it will take due to script lag?

My mod doens't cause lag of any kind, but has been affected by it more than once for other users who have reported such things.
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Return to V - Skyrim