CorsixTH Lua Documentation

HumanoidAction Class

Humanoid action base class.

Declared on: line 21 of Lua/humanoid_action.lua.
Subclasses: AnswerCallAction, CallCheckPointAction, CheckWatchAction, DieAction, FallingAction, GetUpAction, IdleAction, IdleSpawnAction, KnockDoorAction, MeanderAction, MultiUseObjectAction, OnGroundAction, PeeAction, PickupAction, QueueAction, SeekReceptionAction, SeekRoomAction, SeekStaffRoomAction, SeekToiletsAction, ShakeFistAction, SpawnAction, StaffReceptionAction, SweepFloorAction, TapFootAction, UseObjectAction, UseScreenAction, UseStaffRoomAction, VaccinateAction, VipGoToNextRoomAction, VomitAction, WalkAction, YawnAction

Method Index

Member Index

function HumanoidAction:HumanoidAction(name)

Construct a humanoid action (base class constructor).

Parameters:

NameTypeDescription
name str Name of the action.

Declared on: line 27 of Lua/humanoid_action.lua.

function HumanoidAction:afterLoad(old, new)

Parameters:

NameTypeDescription
old ? ?
new ? ?

Declared on: line 112 of Lua/humanoid_action.lua.

function HumanoidAction:disableTruncate()

Do not allow truncating the action.

Declared on: line 105 of Lua/humanoid_action.lua.

function HumanoidAction:setAfterUse(after_use)

Set the callback for performing updates afterwards.

Parameters:

NameTypeDescription
after_use func Callback function that is called after the action ends.

Declared on: line 84 of Lua/humanoid_action.lua.

function HumanoidAction:setCount(count)

Set the number of times the action should happen.

Parameters:

NameTypeDescription
count int or or or nil Set to 'nil' if 'forever', else integer count.

Declared on: line 42 of Lua/humanoid_action.lua.

function HumanoidAction:setIsLeaving(is_leaving)

Set whether the humanoid is leaving.

Parameters:

NameTypeDescription
is_leaving bool Whether or not the humanoid is leaving. If not specified, value is true.

Declared on: line 95 of Lua/humanoid_action.lua.

function HumanoidAction:setLoopCallback(loop_callback)

Set the callback for checking termination conditions.

termination conditions.

Parameters:

NameTypeDescription
loop_callback func Callback function that is called each iteration to check for

Declared on: line 72 of Lua/humanoid_action.lua.

function HumanoidAction:setMustHappen(must_happen)

Set the 'must happen' flag (that is, action cannot be skipped).

Parameters:

NameTypeDescription
must_happen bool Whether or not the action must happen.

Declared on: line 52 of Lua/humanoid_action.lua.

function HumanoidAction:setUninterruptible(uninterruptible)

Set the 'uninterruptible' flag (that is, action cannot be canceled or truncated by pickup).

Parameters:

NameTypeDescription
uninterruptible bool Whether or not the action uninterruptible.

Declared on: line 62 of Lua/humanoid_action.lua.