Skip to content

ClimbingState ​

Inherits: MovementState < RefCounted

MovementState for when entity is climbing ladders or similar traversal objects Handles path-based movement and climbing animations

Variables ​

floatclimbing_progress0.0
intclimb_direction1 # 1 = up, -1 = down
InteractableObjectcurrent_laddernull

Methods ​

voidenter()
voidexit()
voidset_ladder( ladder: InteractableObject )
voidset_progress( progress: float )
voidset_direction( direction: int )

Variable descriptions ​

float climbing_progress = 0.0 ​

How far along the ladder the entity is (0 to 1).

int climb_direction = 1 # 1 = up, -1 = down ​

1 for up, -1 for down.

InteractableObject current_ladder = null ​

The ladder the entity climbs.

Method descriptions ​

void enter() ​

The entity starts to climb.

void exit() ​

The entity stops climbing.

void set_ladder( ladder: InteractableObject ) ​

Set the ladder this state is associated with

void set_progress( progress: float ) ​

Set climb progress (0.0 = start, 1.0 = end)

void set_direction( direction: int ) ​

Set climb direction (1 = up, -1 = down)