Liking cljdoc? Tell your friends :D

cark.behavior-tree.node-defs.consume-event

The :consume-event node consumes an event if it is found in the inbound event list. -If the event was found, the node succeeds. -If the event was not found, the node fails, or stays running if the :wait? parameter is true.

Parameters:

  • :event : A keyword, or keyword returning context function. The name of the event to be consumed.
  • :pick? : A context function with two parameters. first the tree context, then the event argument being considered. This acts as an additional filter when considering incoming events to be consumed. The event will be consumed if this function returns a truthy value.
  • :wait? : A boolean, or boolean returning context function. When true the node will stay :running until the event is consumed.
  • :with-arg : A context function with two parameters, first the tree context, then the consumed event argument. This must return a possibly updated tree context.
The :consume-event node consumes an event if it is found in the inbound event list. 
-If the event was found, the node succeeds.
-If the event was not found, the node fails, or stays running if the :wait? parameter is true.

Parameters:
- :event : A keyword, or keyword returning context function. The name of the event to be consumed.
- :pick? : A context function with two parameters. first the tree context, then the event argument being considered. This acts as an additional filter when considering incoming events to be consumed. The event will be consumed if this function returns a truthy value.
- :wait? : A boolean, or boolean returning context function. When true the node will stay :running until the event is consumed.
- :with-arg : A context function with two parameters, first the tree context, then the consumed event argument. This must return a possibly updated tree context.
raw docstring

compile-nodeclj/s

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

logclj/s

(log value)
source

registerclj/s

(register)
source

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

× close