Reply To: FSM not working after recent update

Forums 💬 NodeCanvas ⚙️ Support FSM not working after recent update Reply To: FSM not working after recent update

#19485
Gavalakis
Keymaster

    Hello again.

    Thanks for taking the time to upload the project.
    So the issue is due to a change made in FSMs after 1.5.8 version.
    What happens now, is that an FSM will automaticaly stop/end if a state has been entered, finished and also there are no outgoing transition from it at all. Which is the case for your starting state “PlayerIdle”.
    The FSM actually starts, executes owner.PlayerIdle() then instantely finish since the state finish and there are not outgoing transitions at all.

    There are 2 options here:
    1. Comment out the code that does this behaviour. In FSM.cs comment out lines #50-54
    2. Force the state to never finish, by adding the “Run Forever” action in the list.

    The reason this behaviour changed from 1.5.8 is for when using FSM as nested to other FSMs or BTs so that an FSM actually ends sometime and the parent graph continues. I think I will revert the previous behaviour though, since there were more people getting confused by this. So feel free to just use the first solution if you like.

    Thanks!
    🙂