Conditions

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ujuj04
Posts: 30
Joined: Sun May 21, 2023 7:34 pm

Conditions

Post by ujuj04 »

Hey, I have a NPC that build a bridge for the player, when the player talks to the NPC. Can I somehow add a branch that when this conversation is finished and the player tries to talk to the NPC again a different convo will play. For example: "Hey, I built the bridge, you're free to cross."

Also is it possible to add a check for a reply. For example, the player can only ask the NPC from above to build the bridge if they have a specific item.

Couldn't find a way to do it in the tutorials, thanks in advance!
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conditions

Post by Tony Li »

Hi,

> Can I somehow add a branch that when this conversation is finished and the player tries to talk to the NPC again a different convo will play.

See: How To: Run a Conversation Only Once

> Also is it possible to add a check for a reply. For example, the player can only ask the NPC from above to build the bridge if they have a specific item.

Please see: Conditions Tutorial. How you check for the specific item depends on your inventory system. If you're using one that has integration, you can use the corresponding Lua function. Otherwise you can register your own C# method with Lua (tutorial).
Post Reply