Autoactivation first time and click required for reread

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Espes
Posts: 24
Joined: Sun Aug 16, 2020 12:29 pm

Autoactivation first time and click required for reread

Post by Espes »

Hello again. I want the dialogue to autoactivate when the player enters the trigger and then require clicking on visual prompt if someone wants to reread dialogue. Is there a way to achieve this?
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Autoactivation first time and click required for reread

Post by Tony Li »

Hi,

Sure! There's any number of ways. An easy way to do it without any scripting is to add two Dialogue System Triggers to the GameObject. Define a variable to remember whether the player has read the dialogue already or not.

Set the first Dialogue System Trigger to OnTriggerEnter. Set its Conditions to require that the variable is false. In the Actions, set the variable true and start the conversation.

Set the second Dialogue System Trigger to OnUse. Set its Conditions to require that the variable is true. In the Actions, start the conversation. To be able to trigger it, add a Proximity Selector to the player.

I glossed over some details, but that's the idea. If you don't want to use a variable, you can configure the first Dialogue System Trigger's Actions to disable the Dialogue System Trigger itself. In this case, you'll probably also want to add an EnabledSaver component so saved games can record the enabled/disabled state of the component.
Post Reply