Page 1 of 1

Conditions

Posted: Tue May 23, 2023 1:55 pm
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!

Re: Conditions

Posted: Tue May 23, 2023 2:25 pm
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).