Page 1 of 1

A way to switch conversations via Playmaker

Posted: Fri Sep 05, 2014 11:37 am
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.

A way to switch conversations via Playmaker

Posted: Fri Sep 05, 2014 11:58 am
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.


A way to switch conversations via Playmaker

Posted: Sat Sep 06, 2014 12:07 am
by willowwake
Great, thanks for the tips.