Branching conversations sending events to PlayMaker
Posted: Sun Jan 11, 2015 4:52 am
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!
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!