PlayMaker Help & Tips > PlayMaker Help
Listening to state changes in FSM
(1/1)
yjwong:
Hi there,
Currently new to Playmaker, is there a way to listen to state changes in a particular FSM? I'm working on a project that works with API.ai (it's a service that processes natural language). Ideally, I would be able to synchronize/send the state name to API.ai whenever state changes happen.
Right now, it's possible for me to use actions, but I'd have to add them to every state.
Cheers
djaydino:
Hi,
make an fsm somewhere and then use 'Get Fsm State' and point it to the fsm component or Gameobject/fsm name ,store the result and check Every Frame.
In the same state have the action 'String Changed' place the result variable and set a changed event.
In the next state you can send the state name and transition back to the 1st state.
Navigation
[0] Message Index
Go to full version