Branching conversations sending events to PlayMaker

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
SamH
Posts: 2
Joined: Sun Jan 11, 2015 9:35 am

Branching conversations sending events to PlayMaker

Post by SamH »

Hi there, I'm new to Dialogue System but would really appreciate if someone could point me in the right direction.



I have a conversation setup with an NPC which branches to 2 possible dialogue tree conclusions. I'd like to trigger one of 2 PlayMaker events based on which branch the conversation ends with. I know dialogue system can send events to PlayMaker, but I think I'm going about it wrong. I tried to put the script FSMEvent(......)   on each of the 2 <span style="text-decoration: underline;">dialogue entries </span>(into the 'script' field) but I get the error:



Dialogue System: Lua code 'FSMEvent(Finish_Convo1_1,Old_Woman)' threw exception 'Invoke function call on non function value.'



-where Finish_Convo1_1 is the name of the event, Old_Woman is the object holding the FSM and I left the FSM name blank.  Reading the documentation it seems like the problem might be that I can only call that script from inside a sequence. But ideally I'd like to call it directly at the end of a conversation branch (if thats possible?)







As a work around I've instead set a variable at the end of the conversation branch, which I can then call from inside Playmaker to determine which branch we ended on, and thus get the result I'm after. But it just seems like using FSMEvent() would be a more direct way to do it.







Any pointers or suggestions would be awesome, thanks!
User avatar
Tony Li
Posts: 22127
Joined: Thu Jul 18, 2013 1:27 pm

Branching conversations sending events to PlayMaker

Post by Tony Li »

Hi,



FSMEvent() is a sequencer command. It's not a Lua function. If you put it in the Sequence field, you should be good to go.
SamH
Posts: 2
Joined: Sun Jan 11, 2015 9:35 am

Branching conversations sending events to PlayMaker

Post by SamH »

Ah so simple,  I totally missed that field. That's great, thanks so much for your help!
Post Reply