HumanoidAction Class
Humanoid action base class.
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
- afterLoad(old, new)
- disableTruncate()
- setAfterUse(after_use)
- setCount(count)
- setIsLeaving(is_leaving)
- setLoopCallback(loop_callback)
- setMustHappen(must_happen)
- setUninterruptible(uninterruptible)
Member Index
- after_use
- count
- idle_must_happen
- is_entering
- is_leaving
- loop_callback
- must_happen
- name
- no_truncate
- saved_must_happen
- state
- uninterruptible
function HumanoidAction:HumanoidAction(name)
Construct a humanoid action (base class constructor).
Parameters:
| Name | Type | Description |
|---|---|---|
| name | str | Name of the action. |
Declared on: line 27 of Lua/humanoid_action.lua.
function HumanoidAction:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| uninterruptible | bool | Whether or not the action uninterruptible. |
Declared on: line 62 of Lua/humanoid_action.lua.