Hi there,
I've read this manual section...:
http://www.pixelcrushers.com/dialogue_s ... akerEvents
...but I can't get to work the thing as I am expecting it to behave. And to be honest, I'm not even sure if I've understood correctly what it's supposed to do.
My main objective is to trigger PlayMaker actions inside an FSM, in an "ENGINE" GameObject, when a conversation starts and ends. To hide and show some UI elements, to be accurate.
I know I could do that the normal way, with the conventional Dialogue System Events component but, from what I've understood in the manual, Dialogue System Events to PlayMaker could be a better solution as it seems to "broadcast" events to all active FSMs (?).
So I went and added that component to Dialogue System Manager and then I've created an 'OnConversationStart' event on an FSM, declared it as 'global' and made this test FSM...:
'Disable UI' deactivates my UI panels... but it never gets executed, as 'OnConversationStart' doesn't get called.
I then went and filled out these fields inside the component...:
...just in case, but it's still not working.
So, what am I doing wrong here? Did I misunderstand what 'Dialogue System Events to PlayMaker' is supposed to do?
Thank you.
Dialogue System Events to PlayMaker (?)
Dialogue System Events to PlayMaker (?)
Unity 2019.4.9f1
Dialogue System 2.2.15
Dialogue System 2.2.15
Re: Dialogue System Events to PlayMaker (?)
Hi,
That's what this component is supposed to do. For this component to receive OnConversationStart messages (so it can pass them to PlayMaker), it needs to be on a GameObject that receives the messages. Make sure the component is on your Dialogue Manager GameObject or one of the conversation participants.
If that looks OK, then prior to assigning an FSM to the FSMs list the Unity editor's Console window probably showed this message:
Now that you've assigned your FSM, it shouldn't log that message. If you tick Debug, the Console should log a line similar to this:
If you see that line but the FSM still isn't receiving the event, double-check that your event is spelled correctly and that it doesn't have any leading or trailing space characters.
Here's an example scene: DialogueSystemEventsToPlayMakerExample_2017-12-31.unitypackage
That's what this component is supposed to do. For this component to receive OnConversationStart messages (so it can pass them to PlayMaker), it needs to be on a GameObject that receives the messages. Make sure the component is on your Dialogue Manager GameObject or one of the conversation participants.
If that looks OK, then prior to assigning an FSM to the FSMs list the Unity editor's Console window probably showed this message:
Code: Select all
Dialogue System: Want to send event OnConversationStart but no FSMs are assigned to Dialogue System Events To Play Maker.
Code: Select all
Dialogue System: Sending OnConversationStart to ENGINE
Here's an example scene: DialogueSystemEventsToPlayMakerExample_2017-12-31.unitypackage
Re: Dialogue System Events to PlayMaker (?)
Hi Tony, happy new year!
I've activated the Debug checkbox and it says this...:
So it is sending events alright, but not to all FSMs in ENGINE. Only 'RunOnceFSM' (first one) get them, which won't have any use for them.
Anyway, what I've done is to create a GameObject with an FSM that forwards ALL events to ENGINE, and set it as the receiver of DS2PM events...:
This implies an additional step, but as it is automated and I won't need to do anything more when I add more reactions to DS events in 'ENGINE', I don't mind it at all.
I'm just curious about if receiving events by the original FSM only, is a known limitation or not (?).
Thank you!
I've activated the Debug checkbox and it says this...:
So it is sending events alright, but not to all FSMs in ENGINE. Only 'RunOnceFSM' (first one) get them, which won't have any use for them.
Anyway, what I've done is to create a GameObject with an FSM that forwards ALL events to ENGINE, and set it as the receiver of DS2PM events...:
This implies an additional step, but as it is automated and I won't need to do anything more when I add more reactions to DS events in 'ENGINE', I don't mind it at all.
I'm just curious about if receiving events by the original FSM only, is a known limitation or not (?).
Thank you!
Unity 2019.4.9f1
Dialogue System 2.2.15
Dialogue System 2.2.15
Re: Dialogue System Events to PlayMaker (?)
Happy New Year!
Dialogue System Events To PlayMaker sends events to all FSMs assigned to the FSMs list. If you have multiple FSMs on a GameObject, Unity's inspector doesn't show it in a very helpful way because for each FSM it shows the GameObject name, which is the same for all of them:
But it will still work fine. It's just a visual limitation with Unity default inspector.
Dialogue System Events To PlayMaker sends events to all FSMs assigned to the FSMs list. If you have multiple FSMs on a GameObject, Unity's inspector doesn't show it in a very helpful way because for each FSM it shows the GameObject name, which is the same for all of them:
But it will still work fine. It's just a visual limitation with Unity default inspector.
Re: Dialogue System Events to PlayMaker (?)
Oooh... okay, now I understand what was happening...!
I've assigned DS2PM events script to the Dialogue System Manager, not the ENGINE GameObject itself, so I couldn't drag & drop those FSM components to the list in the same Inspector window.
You may want to clarify that in the Manual then, because it could be interpreted as if this script could be placed in ONE gameobject only.
Many thanks!
Edit: Mmm, I've written this before actually trying it, and now I don't get any message from the Console saying the script is sending any DS event.
The script doesn't seem to work for me, if it's outside Dialogue System Manager (?)
I've assigned DS2PM events script to the Dialogue System Manager, not the ENGINE GameObject itself, so I couldn't drag & drop those FSM components to the list in the same Inspector window.
You may want to clarify that in the Manual then, because it could be interpreted as if this script could be placed in ONE gameobject only.
Many thanks!
Edit: Mmm, I've written this before actually trying it, and now I don't get any message from the Console saying the script is sending any DS event.
The script doesn't seem to work for me, if it's outside Dialogue System Manager (?)
Unity 2019.4.9f1
Dialogue System 2.2.15
Dialogue System 2.2.15
Re: Dialogue System Events to PlayMaker (?)
Will do.
It needs to be on the Dialogue Manager or one of the conversation participants because those are the GameObjects that receive the OnConversationXXX messages.
Re: Dialogue System Events to PlayMaker (?)
Ah, that explains why it wasn't doing anything.
Okay, I'll stick to the 'Forward All Events' FSM in the middle then.
Thank you!
Okay, I'll stick to the 'Forward All Events' FSM in the middle then.
Thank you!
Unity 2019.4.9f1
Dialogue System 2.2.15
Dialogue System 2.2.15