Hi there, hope all is well.
I have a very simple noob question even though I have been learning this system for a couple years now already. I want to create a trigger event that when i move close to an npc he just says 'get lost'. This works easily by just putting an audio source in the game, putting a collider to it set with a trigger. I put a dialogue system on trigger enter event to enable to audio component and it works fine. The problem is that upon doing it once the Dialogue System seems to disable / destroy the trigger effect.
I want to do it so the sound is played whenever i go near him, not just once. Is there an easy way for this I am overlooking, sorry been away for awhile and might have forgotten something simple. Any help appreciated
edit: I am using invector too by the way, if there is a generic trigger that works better with that? As far as I know they are using dialogue manager triggers any how.
stopping trigger disable
stopping trigger disable
Last edited by glen on Mon Jul 08, 2024 3:55 pm, edited 1 time in total.
Re: stopping trigger disable
Hi,
A Dialogue System Trigger set to OnTriggerEnter should run every time the player enters the trigger collider, not just once. Did you configure something in its Actions section to deactivate the GameObject or disable the Dialogue System Trigger? Or, if you're playing "Get lost" with a conversation, does the conversation's dialogue entry deactivate or disable it?
A Dialogue System Trigger set to OnTriggerEnter should run every time the player enters the trigger collider, not just once. Did you configure something in its Actions section to deactivate the GameObject or disable the Dialogue System Trigger? Or, if you're playing "Get lost" with a conversation, does the conversation's dialogue entry deactivate or disable it?
Re: stopping trigger disable
it only plays once. Only action I have is to enable the audio source. I did read this in the range trigger notes:
''When OnTriggerExit occurs, the GameObjects are deactivated and components disabled. This component is useful to enable components such as Bark On Idle only when the player enters a trigger collider that represents proximity to the barker. You can also configure UnityEvents to run on enter and exit.''
idk if that's whats happening here?
I will try the trigger with a different game object set up and see if i have the same issue
edit: could it be invector messing with the triggers?
''When OnTriggerExit occurs, the GameObjects are deactivated and components disabled. This component is useful to enable components such as Bark On Idle only when the player enters a trigger collider that represents proximity to the barker. You can also configure UnityEvents to run on enter and exit.''
idk if that's whats happening here?
I will try the trigger with a different game object set up and see if i have the same issue
edit: could it be invector messing with the triggers?
Re: stopping trigger disable
Ah, if it's only enabling the audio source, then it will only play once (i.e., when it's first enabled). Instead:
1. Keep the audio source component enabled.
2. UNtick its Play On Awake checkbox.
3. Configure the Dialogue System Trigger to call the audio source component's Play method (AudioSource.Play).
1. Keep the audio source component enabled.
2. UNtick its Play On Awake checkbox.
3. Configure the Dialogue System Trigger to call the audio source component's Play method (AudioSource.Play).
Re: stopping trigger disable
I followed your steps.
It works perfectly.
Thank you
you are a legend
It works perfectly.
Thank you
you are a legend
Re: stopping trigger disable
Happy to help!