How to start conversation automatically on trigger enter?
How to start conversation automatically on trigger enter?
Hello. I have a conversation set to start on entering a trigger, and it does display the prompt to accept input to start the conversation, but I want the conversation to start automatically upon trigger enter without any user input, and I don't want it to display the input prompt. How do I do this for just one specific conversation? Thank you.
Re: How to start conversation automatically on trigger enter?
Hi,
Set that Dialogue System Trigger's trigger dropdown to OnTriggerEnter.
A button will offer to add the 'Player' tag as a Conditions requirement. This will ensure that the conversation only starts when GameObjects tagged 'Player' enter the trigger.
OnTriggerEnter uses regular physics checks, so make sure your layers, colliders, etc., are set up to register collisions. If you're using 2D, enable the Dialogue System's 2D support.
Set that Dialogue System Trigger's trigger dropdown to OnTriggerEnter.
A button will offer to add the 'Player' tag as a Conditions requirement. This will ensure that the conversation only starts when GameObjects tagged 'Player' enter the trigger.
OnTriggerEnter uses regular physics checks, so make sure your layers, colliders, etc., are set up to register collisions. If you're using 2D, enable the Dialogue System's 2D support.
Re: How to start conversation automatically on trigger enter?
Oops this was actually my fault on my end. I had previously had my player tagged as lowercase 'player' and the dialogue system trigger component autofilled the accepted tag as 'Player'. My bad, but thank you for your reply!
Re: How to start conversation automatically on trigger enter?
Oh! If you see this, is there a shortcut to disabling the portrait panel on specific conversations or actors? I can disable it in a script, but wanted to see if there was a built-in way first.
Re: How to start conversation automatically on trigger enter?
Hi,
If no portrait sprite is assigned to the actor, it will automatically disable the portrait image (but not name) when show that actor's subtitle.
Otherwise, you can set up a separate subtitle panel that doesn't have a portrait image (or portrait name, if you want). For example, duplicate 'NPC Subtitle Panel' and remove its Portrait Image and Portrait Name child GameObjects. Assign the subtitle panel to the Standard Dialogue UI component's Conversation UI Elements > Subtitle Panels list. It will have a number in the list.
Then either:
If no portrait sprite is assigned to the actor, it will automatically disable the portrait image (but not name) when show that actor's subtitle.
Otherwise, you can set up a separate subtitle panel that doesn't have a portrait image (or portrait name, if you want). For example, duplicate 'NPC Subtitle Panel' and remove its Portrait Image and Portrait Name child GameObjects. Assign the subtitle panel to the Standard Dialogue UI component's Conversation UI Elements > Subtitle Panels list. It will have a number in the list.
Then either:
- Add a Dialogue Actor component to the actor's GameObject and set Dialogue UI Settings > Subtitle Panel Number to that panel if you want the actor to always use that panel.
- Or use the [panel=#] markup tag in text if you only want to use the panel for one line.