{"repo":"RJ/bevy_behave","free":true,"listed":false,"github":"https://github.com/RJ/bevy_behave","clone":"git clone https://github.com/RJ/bevy_behave.git","description":"Behaviour trees for bevy, with on-demand entity spawning for task nodes.","language":"Rust","stars":123,"topics":["gamedev"],"license":"Apache-2.0","category":"game-templates","readme_excerpt":"bevy behave A behaviour tree plugin for bevy with dynamic spawning. bevy behave is a behaviour tree plugin for bevy with a sensible API and minimal overheads. No magic is required for the task components, they are are regular bevy components using triggers to report status. When an action node (aka leaf node or task node) in the behaviour tree runs, it will spawn an entity with the components you specified in the tree definition. The tree then waits for this entity to trigger a status report, at which point the entity will be despawned. You can also take actions without spawning an entity by triggering an observed Event , which can also be used as a conditional in a control node. This tree definition is from the chase example: You can also compose trees from subtrees Once you have your tree definition, you spawn an entity to run the behaviour tree by adding a BehaveTree component: If your behaviour tree is not a child of the target entity you want to control, you can specify the target entity explicitly: Or in case of a deeper hierarchy, you can use BehaveTargetEntity::RootAncestor to find the topmost entity. Control Flow Nodes The following control flow nodes are supported. Control flow logic is part of the BehaveTree and doesn't spawn extra entities. Node Description ----------------------- --------------------------------------------------------------------------------------------------------------------------------- Behave::Sequence Runs children in sequence, failing if a","default_branch":null,"files":null,"tree":[],"storefront":"/r/RJ","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/RJ/bevy_behave/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}