Stop current conversation and start new on object click

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Stop current conversation and start new on object click

Post by Ekta Bhutwala »

Hii

I want to stop current conversation and start new one when i click on 2d sprite.

And deactivate one object and activate another one when i click on 2d sprite.
User avatar
Tony Li
Posts: 21970
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop current conversation and start new on object click

Post by Tony Li »

Tick the Dialogue System Trigger's Actions > Start Conversation > Replace checkbox. You can also use an OnExecute() UnityEvent or Set GameObjects Active/Inactive action to deactivate a GameObject. The example below assumes you have a Selector set to Select At: Mouse Position and Use Key set to Mouse 0. The sprite has a Usable, so when the player clicks on the GameObject it will trigger the Dialogue System Trigger.

replaceConversation.png
replaceConversation.png (58.39 KiB) Viewed 222 times

If you're using something other than a Selector to click on sprites, set the Dialogue System Trigger to OnUse, and call the OnUse method when the player clicks on the sprite.
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Re: Stop current conversation and start new on object click

Post by Ekta Bhutwala »

Hii Tony.

I don't get on trigger or on collision call when i click on sprite game object. i have added 2d collider and having trigger Boolean true but i am not getting what i missing.

I checked 3-4 times.

Please help me this is too simple but i am not getting my error/mistake.
Ekta Bhutwala
Posts: 40
Joined: Mon Sep 05, 2022 5:40 am

Re: Stop current conversation and start new on object click

Post by Ekta Bhutwala »

Ok i have changed to onUSE now its working.

Thanks.
User avatar
Tony Li
Posts: 21970
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop current conversation and start new on object click

Post by Tony Li »

Glad to help!
Post Reply