Haytam95
Active member
Hi
I'm splitting my AI system into smaller BD Tree using State Machines with Playmaker. So for example, here is one of my FSM
Each of those blocks starts a Behavior Designer Tree and then when something happens, those post an FSM event. Also the Tree are desactivated when FSM changes it's state, because the Tree ends.
So far so good. The trouble comes when I want to have a BD that runs on a Repeater, because the Tree will continue running even if the FSM isn't in that state.
In order to fix that problem, I created a simple Playmaker action that stops the Tree when the state exit. Just like this:
Trouble is, that BD gets desactivated before sending the event, so FSM hangs out in the current state.
BD died here:
------------------------------------------------------------------------------------------------------------------------------
Edit:
The problem is that Sequence is returning Success without running it's child tasks, here is the gif debugging:
------------------------------------------------------------------------------------------------------------------------------
Edit 2:
Looks like the Behavior Tree doesn't load up completly on Enable, the first frame. I've been able to partially fix the problem by using Async load (But at some point the Behavior Tree fails for the same reason, the Sequence returns true because don't have load any child yet).
The way I fixed this was by adding a Repeater forever at start of the Trees. So the Tree don't return a value and keeps executing until the event makes FSM change the state.
@Justin if you need I can give you the Scene to check this issue
I'm splitting my AI system into smaller BD Tree using State Machines with Playmaker. So for example, here is one of my FSM
Each of those blocks starts a Behavior Designer Tree and then when something happens, those post an FSM event. Also the Tree are desactivated when FSM changes it's state, because the Tree ends.
So far so good. The trouble comes when I want to have a BD that runs on a Repeater, because the Tree will continue running even if the FSM isn't in that state.
In order to fix that problem, I created a simple Playmaker action that stops the Tree when the state exit. Just like this:
Trouble is, that BD gets desactivated before sending the event, so FSM hangs out in the current state.
BD died here:
------------------------------------------------------------------------------------------------------------------------------
Edit:
The problem is that Sequence is returning Success without running it's child tasks, here is the gif debugging:
------------------------------------------------------------------------------------------------------------------------------
Edit 2:
Looks like the Behavior Tree doesn't load up completly on Enable, the first frame. I've been able to partially fix the problem by using Async load (But at some point the Behavior Tree fails for the same reason, the Sequence returns true because don't have load any child yet).
The way I fixed this was by adding a Repeater forever at start of the Trees. So the Tree don't return a value and keeps executing until the event makes FSM change the state.
@Justin if you need I can give you the Scene to check this issue
Last edited: