Playmaker SendEvent clarification
Posted: Fri Nov 04, 2016 10:08 am
Hi there,
Wondering if you can help. I have a conversation being started by playmaker action (all working great) and I'm trying to SendEvent to the currently active NPC.
In the documentation it says:
So I want to send an event to the current NPC at the end of the conversation, I can send one perfectly if I specify the NPC gameObject directly with:
There are only 2 FSMs on NPC_Human_A, so
works fine
BUT if I do
Nothing happens, I made sure that when the conversation is triggered I have specified the NPC as the conversant in the playmaker action (so it's used as the speaker).
The reason I want this to work without directly targetting the NPC gameObject is so I can use the same conversation on on a different NPC, and that the sendEvent works on them, rather than always NPC_Human_A.
Any ideas on what I may have missed? Many thanks for your time
Gaz
Wondering if you can help. I have a conversation being started by playmaker action (all working great) and I'm trying to SendEvent to the currently active NPC.
In the documentation it says:
Code: Select all
In your Sequence, call FSMEvent(eventName, gameObject, fsmName). This will send an event named eventName to an FSM named fsmName on a specific gameObject.
If you leave out fsmName, it will send the event to all FSMs on the gameObject.
If you leave out gameObject, it will send the event to the speaker.
Code: Select all
FSMEvent(goto_B, NPC_Human_A, Interact)
Code: Select all
FSMEvent(goto_B, NPC_Human_A)
BUT if I do
Code: Select all
FSMEvent(goto_B)
The reason I want this to work without directly targetting the NPC gameObject is so I can use the same conversation on on a different NPC, and that the sendEvent works on them, rather than always NPC_Human_A.
Any ideas on what I may have missed? Many thanks for your time

Gaz