FSM State Traversing Multiple Nodes With 1 Event Check

NodeCanvas Forums Support FSM State Traversing Multiple Nodes With 1 Event Check

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9559
    Async0x42
    Participant

    Hey, I’m running into an issue with a simple FSM where two states will drop to the next state, if an event is triggered. The problem is that:

    Event triggered -> State ‘A’ switches to state ‘B’, but immediately state ‘B” switches to state ‘C’ with no pause between. Basically I’m trying to have it, if player gets hit one, he goes A -> B, but hit twice, B -> C, right now, he’s going A-B-C all in one hit, with one event being fired.

    Attached is a demo of the FSM. (Player goes from Grown -> Mini -> Dead with one hit and event)

    #9562
    Gavalakis
    Keymaster

    Hey,

    Yeah, the raised events will hold true for 1 frame and the transition are checked in the same frame that the state has been entered and thus why both transitions are true for that frame.
    I will take a look at possibly making the transition checks 1 frame later.

    Cheers.

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

    #9561
    Async0x42
    Participant

    Okay thanks! Is there something in the graph I can do as a simple workaround for this? If not I’ll just wait, I’m not rushed.

    #9560
    Gavalakis
    Keymaster

    Hello,

    Very sorry for late reply.
    There is unfortunately no graph hack to workaround this. I will have to make it work in code.

    Thanks!

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

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