Liking cljdoc? Tell your friends :D
All platforms.

cark.behavior-tree.node-defs.on-cancel

The :on-cancel node has exactly two children. The first one is the cancel node and the second one is the payload node. It executes its payload node in a transparent manner. If the node is cancelled, that is when it goes from the :running state to the :fresh state, the cancel node is then executed.

Please note that the cancel node must succeed or fail in a single behavior tree tick.

This node is particularly usefull for releasing previously aquired resources, like a network socket for instance.

[:on-cancel [:send-event {:event :release-the-socket}]
  use-socket-sub-tree]
The :on-cancel node has exactly two children. 
The first one is the cancel node and the second one is the payload node.
It executes its payload node in a transparent manner. If the node is cancelled, that is
when it goes from the :running state to the :fresh state, the cancel node is then executed.

Please note that the cancel node must succeed or fail in a single behavior tree tick.

This node is particularly usefull for releasing previously aquired resources, like a network socket for instance.

```clojure
[:on-cancel [:send-event {:event :release-the-socket}]
  use-socket-sub-tree]
```
raw docstring

compile-nodeclj/s

(compile-node tree id tag params [cancel-id payload-id])
source

registerclj/s

(register)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close