How to implement FSM Trigger?

NodeCanvas Forums Support How to implement FSM Trigger?

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14792
    bestpig
    Participant

    In FSM, how do I set up a trigger transition? For example, to go from an Idle state to Walking state, I’d like a move trigger, but I can’t seem to figure it out

    It seems to only want me to use transitions that checks something in order to make the transition

    I want to just send a “command” or message into the FSM and have it figure out what transition to make

    #14793
    Gavalakis
    Keymaster

    Hello,

    I think that what you are after are sending events to the FSM graph and checking those events on transitions.

    You can check events with the “Check Event” condition task which can be added on an FSM transition similar to all other conditions.

    Then to “trigger” that event, you will have to use fsmOwner.SendEvent(string eventName); in your code, or alternatively use the included Action called “Send Event” (which basically does that exact same thing). Remember of course that the event name sent and checked have to be the same.

    Let me know if that is what you were after.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.