Page 1 of 1

Stop current conversation and start new on object click

Posted: Fri Sep 09, 2022 6:12 am
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.

Re: Stop current conversation and start new on object click

Posted: Fri Sep 09, 2022 9:14 am
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 233 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.

Re: Stop current conversation and start new on object click

Posted: Tue Sep 13, 2022 1:14 am
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.

Re: Stop current conversation and start new on object click

Posted: Tue Sep 13, 2022 1:24 am
by Ekta Bhutwala
Ok i have changed to onUSE now its working.

Thanks.

Re: Stop current conversation and start new on object click

Posted: Tue Sep 13, 2022 8:10 am
by Tony Li
Glad to help!