A way to switch conversations via Playmaker

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
willowwake
Posts: 4
Joined: Thu Aug 21, 2014 5:33 am

A way to switch conversations via Playmaker

Post by willowwake »

Hi,



I have an NPC called 'Smith' who has two completely separate conversations listed in the database as Smith_1 and Smith_2.



I want to use a Playmaker FSM to be able to set which of the two conversations will happen when the Player selects the Smith NPC. Is this possible?



Thanks for your time.
User avatar
Tony Li
Posts: 22093
Joined: Thu Jul 18, 2013 1:27 pm

A way to switch conversations via Playmaker

Post by Tony Li »

Hi,



Yes. You have a lot of options. Here are some suggestions. I'm sure there are plenty other ways to do it, too.



Use the Dialogue System > Set Variable action to set a Lua variable -- for example, set a variable ConvNum to 1 or 2. Add two Conversation Triggers to your Smith NPC. On one, set the conversation to "Smith_1" and the Lua condition to "Variable['ConvNum'] == 1". On the other, set the conversation to "Smith_2" and the Lua condition to "Variable['ConvNum'] == 2".

Add two Conversation Triggers without conditions. Use the Script Control > Enable Behaviour action to enable the one you want to use and disable the other one.

Instead of using Conversation Triggers, manually start the desired conversation using the Dialogue System > Start Conversation action.

willowwake
Posts: 4
Joined: Thu Aug 21, 2014 5:33 am

A way to switch conversations via Playmaker

Post by willowwake »

Great, thanks for the tips.
Post Reply