Playmaker and conditional aborts

isolatedpurity

New member
So I've been working with playmaker for a long time and recently decided to try utilizing it and Behavior Designer. I am wondering how exactly I would handle a situation where the ai gets hit, receives a "got hit" event from the attacker evaluates its health in the fsm then determines if its dead or not using a simple float compare and if not it do other things.

My problem is, I figured I could use a conditional abort lower priority to continue to reevaluate if its dead or not. The fsm should return a success if dead and make the behavior tree abort any lower priority tasks but it does not.
 
What does your tree look like? You can use the conditional Playmaker task to have conditional aborts revaluate that task.
 
What does your branch look like when it's running? Also, it looks like you have an error on your failure state within the FSM which could cause problems.
 
You should resume the behavior tree with a failure state when the agent is dead. Is the conditional task being reevaluated when the tree is running?
 
You should resume the behavior tree with a failure state when the agent is dead. Is the conditional task being reevaluated when the tree is running?
Perhaps I am misunderstanding the use of the conditonal abort or maybe behavior trees in general. So the way my FSM is setup is

Damage FSM receives an event when attacked to do the math and determine if its dead. My intent was when this AI gets attacked to use a behavior tree to determine what it should do next, IE take cover, run away, stand and fight etc I can do all of this in an FSM but it gets really messy. So my thought was to return a failure state when initially ran to skip the tree of being hit but when it IS hit to return success to determine what to do.
 
You should return a failure state when the character is dead, and then that will allow the abort to reevaluate to failure. When the character is alive you return a success state within the FSM. Make sure your conditional abort is being reevaluated though, you can check by ensuring there is a circle around the execution status:

 
Back
Top