Switch to another conversation based on condition

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
will_888
Posts: 26
Joined: Mon Feb 07, 2022 4:09 am

Switch to another conversation based on condition

Post by will_888 »

Hello to everyone!

I'm struggling with understanding how can I switch a conversation added to an NPC based on a pre-existing condition.

Example:

1) Character A talks with Character B; Variable X is set to "true"; conversation ends
2) Character A talks with Character B; if Variable X is set to true, the dialogue tree switches to another conversation.

Game-wise, what I need to do is have the Player have the INITIAL conversation of the game with an NPC character. Afterward, such first conversation isn't available anymore and the interaction will now always lead to a default NPC dialogue (which is the one who is going to stay for the rest of the game, until new conditions are met).


I hope I was clear with the explanation and thank you so much to anyone who is willing to help!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switch to another conversation based on condition

Post by Tony Li »

Hi!

Please see: How To: Run a Conversation Once. The second post shows how to run a different conversation the second time.
will_888
Posts: 26
Joined: Mon Feb 07, 2022 4:09 am

Re: Switch to another conversation based on condition

Post by will_888 »

Thank you so much, I've used your solution and achieved the desired result. ;)
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Switch to another conversation based on condition

Post by Tony Li »

Great! Glad to help.
Post Reply