Skip to content

Pre made Behaviors and Nodes

Arthur Casals edited this page Aug 14, 2019 · 2 revisions

This is a curated list with some of the more specialized Nodes and Behaviors that are available out of the box in different modules. Soon: new behaviors from GSoC 2019!

Module: Behaviors

Behaviors

stray, do_random_move

Stray

A basic tree for critters. The entity starts the Walk animation, executes the do_random_move tree, then waits a while in the Stand animation, then repeats. Results in randomly wandering mobs.

Do random move

{ sequence : [ set_target_nearby_block, move_to  ] }

Short, utilitarian tree. When ran, finds a nearby block and moves towards it.

Nodes

Control Nodes

The target referred to in the following nodes is the target variable of the entity's MinionMoveComponent.

SetTargetLocalPlayerNode

Sets the target to the block the player is currently standing on.

SetTargetToNearbyBlockNode

Sets the target to a random reachable block near the entity.

Movement Nodes

FindPathToNode

Requests a path towards a block from the Pathfinding system. This Path will be saved as path in the entity's MinionMoveComponent.

RUNNING while the path is being searched for

SUCCESS once a path has been found

FAILURE if a path can't be found

MoveToNode

Moves to the target specified in MinionMoveComponent.

RUNNING while the actor is moving towards the target SUCCESS when the target is reached

MoveAlongPathNode

Moves along the path.

JumpNode

Triggers a single jump into the air.

RUNNING while the jump is in progress

SUCCESS once the actor lands

Sound Nodes

PlaySound

Properties: sound, volume

Plays a sound (wow, really?)

RUNNING: while sound is playing

SUCCESS: once sound ends playing

FAILURE: otherwise

PlayMusic

Properties: music

Starts playing music

RUNNING: while music is playing

SUCCESS: once music ends playing

FAILURE: otherwise