AngryAnt / Behave-release

The Behave project is a system for designing, integrating and running behaviour logic using Behaviour Trees for simulated characters in unity projects. NOTE: This project relates to Behave 1. For Behave 2 support and information, please use the AngryAnt community at http://community.angryant.com
http://angryant.com/behave
34 stars 6 forks source link

Bug - to a Selector, a Decorator's failure is not equivalent to a child failure #54

Closed vikoalucard closed 11 years ago

vikoalucard commented 11 years ago

When you have a selector and the first child is a decorator, if it returns "false", then the selector doesn't tick the next action, it continues ticking that same decorator.

In my case, I use decorators to "interrupt" running children and go into "survival" mode. Should we only use decorators's false state for complete "reset", or can they be used as simple filters (and should they return "false" in the case the filter blocks ?)

Thanks for this great component Emil !

diegodorado commented 11 years ago

I'm having the same issue. It seems to me that selector is acting as a sequence.... am i wrong?

diegodorado commented 11 years ago

Any update on this issue? Are we using it the wrong way? Im new to Bedhaviour Trees.

but, i the first child of a selector is a decorator and it returns BehaveResult.Failure, shouldn't it go for the next child selector on the current tick? It instead stop the execution.

AngryAnt commented 11 years ago

Sorry about the late reply. The scenario is by (stupid) design.

Decorators can never return failure as their handlers return value is used to control repeat/interrupt/passthrough.

In 2.0 this has been addressed by turning the decorator into two separate control components: Interrupter and Repeater.

diegodorado commented 11 years ago

When will 2.0 be released? Can I try it now? any beta release?