Hi,
I have a number of characters in a scene with quest state listeners. I've attached some events upon entering certain quest states (active, success and return to NPC), one of which is a sound effect being played. Problem: it seems like the onEnterState is fired every time a scene loads, so my sound effect for entering the current quest state gets retriggered every time I switch scenes.
Is there a built-in way to avoid this behaviour, or do I have to write custom code to ensure the sound effect is only played the first time the quest state is updated?
Quest State Listener and scene changes
Re: Quest State Listener and scene changes
Hi,
Here's a patch with a change that will be in version 2.2.21:
DS_QuestStateListenerPatch_2021-09-29.unitypackage
Quest State Listener components now have a 'Suppress OnEnterState() Events On Start' checkbox. If you tick it, it won't run OnEnterState() events when the scene starts.
Here's a patch with a change that will be in version 2.2.21:
DS_QuestStateListenerPatch_2021-09-29.unitypackage
Quest State Listener components now have a 'Suppress OnEnterState() Events On Start' checkbox. If you tick it, it won't run OnEnterState() events when the scene starts.