Dialogue trigger when hitting a certain value

Announcements, support questions, and discussion for the Dialogue System.
simplepleasuresdxy
Posts: 73
Joined: Tue Jul 25, 2023 1:34 am

Re: Dialogue trigger when hitting a certain value

Post by simplepleasuresdxy »

okay, I have set up the code and added the dialogue system trigger. What do I do to link the single click animation parent to the dialogue system trigger?

Image
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue trigger when hitting a certain value

Post by Tony Li »

Hi,

Set it up similarly to my Button > OnClick screenshot above. There are 3 steps:

1. Add two elements to the OnClick() UnityEvent by clicking "+" twice.

2. Assign the top Dialogue System Trigger to the first element, and select DialogueSystemTrigger.OnUse.

3. Assign the bottom Dialogue System Trigger to the second element, and select DialogueSystemTrigger.OnUse.

setupOnClick.png
setupOnClick.png (98.32 KiB) Viewed 394 times
simplepleasuresdxy
Posts: 73
Joined: Tue Jul 25, 2023 1:34 am

Re: Dialogue trigger when hitting a certain value

Post by simplepleasuresdxy »

Is there a version if this where instead of activating after 7 clicks, it could be like "the first time you click on this,trigger a dialogue" ?

Thank you so much for the help btw. I know ive asked a lot of dumb questions. I am very grateful to hav3 you help.
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue trigger when hitting a certain value

Post by Tony Li »

Hi,

Glad to help. This one's simpler. You only need one Dialogue System Trigger for it. Please see: How To: Run a Conversation Only Once
simplepleasuresdxy
Posts: 73
Joined: Tue Jul 25, 2023 1:34 am

Re: Dialogue trigger when hitting a certain value

Post by simplepleasuresdxy »

Image

just tested it, it doesn't seem to work so I assume I messed up some where
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue trigger when hitting a certain value

Post by Tony Li »

Hi,

Are you asking about the one-time trigger or the 7-clicks trigger?
simplepleasuresdxy
Posts: 73
Joined: Tue Jul 25, 2023 1:34 am

Re: Dialogue trigger when hitting a certain value

Post by simplepleasuresdxy »

7 clicks haha
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue trigger when hitting a certain value

Post by Tony Li »

Looks fine so far. Make sure to select the OnUse() method for each of the Dialogue System Triggers in the OnClick() UnityEvent:

7clicks.png
7clicks.png (117.07 KiB) Viewed 387 times
simplepleasuresdxy
Posts: 73
Joined: Tue Jul 25, 2023 1:34 am

Re: Dialogue trigger when hitting a certain value

Post by simplepleasuresdxy »

That must be it. Alright. I'll check out and see if it works when i get home.
simplepleasuresdxy
Posts: 73
Joined: Tue Jul 25, 2023 1:34 am

Re: Dialogue trigger when hitting a certain value

Post by simplepleasuresdxy »

so the variable is increasing, but it's not triggering the dialogue

also, it's increasing in increments of 2 for some reason
Image
Post Reply