Decorators

Decorators can modify the result of a node. These decorators can be added as a node or as a modifier in the output of a node.

Inverter

../../_images/node-inverter.png

Inverts the result. Success becomes Failure and Failure becomes Success. Error and Running remain unchanged.

Inverter

In

Out

Running

Running

Success

Fail

Fail

Success

Error

Error

Always Succeed

../../_images/node-always-succeed.png

A node always succeed.

Always Succeed

In

Out

Running

Success

Success

Success

Fail

Success

Error

Success

Always Fail

../../_images/node-always-fail.png

A node always fails.

Always Fail

In

Out

Running

Fail

Success

Fail

Fail

Fail

Error

Fail

Until Success

../../_images/node-until-success.png

Node keeps running until a Success or an Error is returned.

Until Fail

../../_images/node-until-fail.png

Node keeps running until a Fail or an Error. In case of a failure a Success is returned.

Limiter

../../_images/node-limiter.png

With this decorator you can limit the number of times the subtree is evaluated.

  • Limit: Max number of times the subtree may be evaluated. Returns Fail when limit is met. Otherwise the result of the child subtree is returned.

Guard

../../_images/node-guard.png

With the Guard decorator you can limit the number of times a subtree is evaluated in the current frame.

  • Limit: Max number of times the subtree may be evaluated in a frame. Returns Fail when limit is met. Otherwise the result of the child subtree is returned.

Max Time

../../_images/node-max-time.png

With this decorator you can set the maximum time in frames for the child node to be evaluated.

  • Frames: Max number of frames a node may run before finishing. Returns Fail when limit is met. Otherwise the result of the child subtree is returned.

Repeat

../../_images/node-repeat.png

Loop the subtree a number of times. Each agent selects a random number between minimum and maximum repeats that will be used as its loop count.

  • Min Repeat: Minimum number of times an agent should loop the subtree.

  • Max Repeat: Maximum number of times an agent should loop the subtree.