Prevent to reopen dialog for a shot time

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Noa3
Posts: 2
Joined: Sun Nov 21, 2021 9:38 am

Prevent to reopen dialog for a shot time

Post by Noa3 »

Hi i want to ask what the best way would be to prevent the player to reopen a dialog short after he have already spoken with it.

i use Proximity Sensor on the player and the Usable components on the interactables.

like the situation he goes to an object and want to interact with it. if he want to spam the use/dialog skip button then the dialog goes through and reopens again if the button got pressed one time.

i hope you understand what i mean and thanks for your time.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Prevent to reopen dialog for a shot time

Post by Tony Li »

Hi,

Add a Dialogue System Events component. Configure OnConversationStart() to disable the Usable. Configure OnConversationEnd() to start a Timed Event that re-enables the Usable:

delayReuse.png
delayReuse.png (39.98 KiB) Viewed 157 times
User avatar
Noa3
Posts: 2
Joined: Sun Nov 21, 2021 9:38 am

Re: Prevent to reopen dialog for a shot time

Post by Noa3 »

thanks this worked, i created a script wich turn all usables off while in dialog and turn them on if the dialog is finished
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Prevent to reopen dialog for a shot time

Post by Tony Li »

Sounds good!
Post Reply