LocalPlayer
constLocalPlayer:object
Defined in: client/api.d.ts:3369
The local player and its native-component controls.
Type Declaration
Section titled “Type Declaration”
readonlygait:LocalPlayerGait
Walk/jog locomotion, including the RP walk-by-default inversion.
stateInfo
Section titled “stateInfo”
readonlystateInfo:LocalPlayerStateInfo
Curated death / health / invulnerability state controls on the CharacterStateInfo component.
readonlywand:LocalPlayerWand
Draw, stow and restyle the local player’s wand.
abilityStatus()
Section titled “abilityStatus()”abilityStatus(
handle):"unknown"|"started"|"ended"|"interrupted"|"failed"|"requested"|"cancelled"
Current status of a tracked ability. Finished handles stay readable for a while; “unknown” means the id was never issued or has aged out.
Parameters
Section titled “Parameters”handle
Section titled “handle”number | AbilityHandle
A handle from playAbility, or its id.
Returns
Section titled “Returns”"unknown" | "started" | "ended" | "interrupted" | "failed" | "requested" | "cancelled"
aimState()
Section titled “aimState()”aimState():
object
Diagnostic snapshot for the aim hold: holders names the resources holding aim off, and locked is whether the game’s aim lock is on right now.
Returns
Section titled “Returns”object
enabled
Section titled “enabled”enabled:
boolean
holders
Section titled “holders”holders:
string[]
locked
Section titled “locked”locked:
boolean
anchor()
Section titled “anchor()”anchor(
at):boolean
Seats the local player exactly at a point, overlapping whatever is there (a chair, a bench under a table), and holds them: no gravity, no push-out, collision still on. Movement keys do nothing until releaseAnchor, so bind your own stand-up. Calling it again re-seats. Death, a kneel, mounting, a server hold or teleport, a fast travel, setPosition and a map load release it; anchorReleased says which. Returns false with no pawn, or while dead, kneeling, riding, held or mid-teleport.
Parameters
Section titled “Parameters”The sit point at FLOOR level (e.g. a seat’s AnimStart socket); the body’s feet height is added, so a resized character lands right. yaw defaults to the current facing; camera: true turns the camera too; seated: true also refuses the player’s spells and Protego until the anchor ends, as a sitting body casts nothing.
camera?
Section titled “camera?”boolean
seated?
Section titled “seated?”boolean
number
number
number
number
Returns
Section titled “Returns”boolean
availableGear()
Section titled “availableGear()”availableGear(
slot):GearItem[] |null
Owned gear that fits one slot, each flagged with whether it is the worn one — the list a gear UI shows for that body part. Includes gear registered by UGC mods, since the slot comes from the GearItems table rather than the item’s name. null if the slot is unknown or the manager isn’t up.
Parameters
Section titled “Parameters”string
A slot name from gearSlots; matched case-insensitively.
Returns
Section titled “Returns”GearItem[] | null
cancelAbility()
Section titled “cancelAbility()”cancelAbility(
channel?):boolean
Ends whatever occupies an Able channel. REQUIRED after playAbility for any ability whose m_Length is infinite (the throw and swipe both are) — the Behaviour Tree normally tears those down, and nothing else will.
Parameters
Section titled “Parameters”channel?
Section titled “channel?”string
Able channel to clear; defaults to “PartialBody”.
Returns
Section titled “Returns”boolean
cancelAbilityHandle()
Section titled “cancelAbilityHandle()”cancelAbilityHandle(
handle):boolean
Ends the ability behind a handle ONLY while it still holds its channel — a replacement is left alone, unlike cancelAbility(channel). Returns whether a cancel was actually issued; false means the playback was already over or replaced.
Parameters
Section titled “Parameters”handle
Section titled “handle”number | AbilityHandle
A handle from playAbility, or its id.
Returns
Section titled “Returns”boolean
castingState()
Section titled “castingState()”castingState():
object
Diagnostic snapshot for the casting hold: holders names the resources holding casting off, and locked is whether the game’s spell lock is on right now, which is also true while the player wears an animal form.
Returns
Section titled “Returns”object
enabled
Section titled “enabled”enabled:
boolean
holders
Section titled “holders”holders:
string[]
locked
Section titled “locked”locked:
boolean
clearProp()
Section titled “clearProp()”clearProp(
key?):boolean
Destroys the prop held under that key, one waiting to come back after a map load included; props under other keys stay. Returns whether one was on the body. Throws a TypeError for a key that is not a string, and a RangeError for one over 32 characters.
Parameters
Section titled “Parameters”string
The key the prop was equipped under; omitted, the keyless prop.
Returns
Section titled “Returns”boolean
clearVelocity()
Section titled “clearVelocity()”clearVelocity():
boolean
Clears local movement velocity. Returns false without a pawn or movement component.
Returns
Section titled “Returns”boolean
dodgeState()
Section titled “dodgeState()”dodgeState():
object
Diagnostic snapshot for the dodge hold: holders names the resources holding dodge off, and locked is whether the game’s dodge lock is on right now.
Returns
Section titled “Returns”object
enabled
Section titled “enabled”enabled:
boolean
holders
Section titled “holders”holders:
string[]
locked
Section titled “locked”locked:
boolean
emotePreview()
Section titled “emotePreview()”emotePreview(
options?):EmotePreviewState
Drives a local-only copy of your character, pinned inside the camera frustum so it floats beside a menu like an emote preview. Nobody else sees it, and unlike the real player it can play motion clips, not only held poses. Ability emotes have no preview — a dummy is unpossessed.
Parameters
Section titled “Parameters”options?
Section titled “options?”clip and emote set what the figure plays; show spawns or drops it. Omit everything to just read the state back.
string
emote?
Section titled “emote?”string
boolean
boolean
Returns
Section titled “Returns”equippedGear()
Section titled “equippedGear()”equippedGear():
Record<string,GearItem|null> |null
What the local player is wearing, keyed by slot, with null for the empty ones. One native call. null if the GearManager isn’t up.
Returns
Section titled “Returns”Record<string, GearItem | null> | null
equipProp()
Section titled “equipProp()”equipProp(
path,socketOrOptions?):boolean
Spawns a mesh and attaches it to the local body at a socket, replacing the prop held under the same key. Props under different keys are held together, 6 at most with the keyless one, and two keys may share a socket. Replicates as state, so other players see them, including players who arrive later, until clearProp. False without a body, for a path that is no mesh, or for a seventh key; a malformed key or materials throws as the server’s equipProp does. Warns when the socket does not exist, because the engine silently attaches at the component origin instead. The default socket is the wand’s, so take the wand away or name another.
Parameters
Section titled “Parameters”string
A StaticMesh OR SkeletalMesh asset path — the asset kind picks the actor class and the setter.
socketOrOptions?
Section titled “socketOrOptions?”string | PropOptions
The body-mesh socket of the keyless prop, or the options; the socket defaults to “WandSocket”.
Returns
Section titled “Returns”boolean
finishActivity()
Section titled “finishActivity()”finishActivity():
boolean
Ends the activity under way: its companion goes its own way, as a kite reels in and a cloud rains itself out, and the outro plays. False when none was under way.
Returns
Section titled “Returns”boolean
gameplayStat()
Section titled “gameplayStat()”gameplayStat(
name,field?):number|null
Reads one of the pawn’s gameplay stats. null when there’s no pawn or the name doesn’t resolve.
Parameters
Section titled “Parameters”string
An ABiped_Player FGameplayProperty_Float — OffenseStat, DefenseStat, CooldownStat, StatDamageMultiplier, StatDamageReduction, …
field?
Section titled “field?”string
Which field to read: “Current” (default), “Base”, “Min” or “Max”.
Returns
Section titled “Returns”number | null
gearSlots()
Section titled “gearSlots()”gearSlots():
string[]
The equippable gear slots, read from the game’s own GearSlotTypes table (Head, Face, Neck, Hand, Back, Outfit). Empty until the GearManager is up. Boots and trousers are not slots of their own — they are part of Outfit.
Returns
Section titled “Returns”string[]
gearStats()
Section titled “gearStats()”gearStats(
itemId,variation):GearItemStats|null
Read-only: one owned gear item’s rolled stats, straight from its GearItemsDynamic row: level, offense, defense, cooldown, the Loom upgrades applied, whether it is identified, and its trait ids in slot order. Works for worn and unworn, identified and unidentified gear. null when there is no such row or the GearManager isn’t up.
Parameters
Section titled “Parameters”itemId
Section titled “itemId”string
The GearID, e.g. from availableGear or an inventory row.
variation
Section titled “variation”string
That item’s variation; “” reads the row stored as None.
Returns
Section titled “Returns”GearItemStats | null
getActivity()
Section titled “getActivity()”getActivity(): {
id:ActivityId;variant:ActivityVariant|""; } |null
The activity under way and its variant (“” for one without variants), or null.
Returns
Section titled “Returns”{ id: ActivityId; variant: ActivityVariant | ""; } | null
getAnchor()
Section titled “getAnchor()”getAnchor(): {
x:number;y:number;yaw:number;z:number; } |null
The floor-level point and facing the player is anchored at, or null.
Returns
Section titled “Returns”{ x: number; y: number; yaw: number; z: number; } | null
getBonePosition()
Section titled “getBonePosition()”getBonePosition(
name,networkId?): {x:number;y:number;z:number; } |null
The world position of a bone or socket on a player’s body as this client draws it, in the pose the body last evaluated: a body that is not animating, off screen say, reports where the bone last was.
Parameters
Section titled “Parameters”string
A bone or socket of the body’s skeleton, e.g. “head” or “WandSocket”.
networkId?
Section titled “networkId?”number
A player whose body this client draws; omit for the local one.
Returns
Section titled “Returns”{ x: number; y: number; z: number; } | null
The position, or null for an unknown player, a body not spawned here, or a name the skeleton does not have.
getControlRotation()
Section titled “getControlRotation()”getControlRotation():
Rotator|null
Returns the live controller rotation, or null without a pawn/controller.
Returns
Section titled “Returns”Rotator | null
getHazards()
Section titled “getHazards()”getHazards():
LocalHazard[]
The server hazard zones (ZoneHazard) the local player stands in, by zone id. Empty outside them. The damage, fog and tint they ask for are applied by the client itself.
Returns
Section titled “Returns”getPosition()
Section titled “getPosition()”getPosition():
Vec3|null
Returns the local pawn’s world location, or null before it has spawned.
Returns
Section titled “Returns”Vec3 | null
getProp()
Section titled “getProp()”getProp():
HeldProp|null
The keyless prop on your body, or null when none is held; getProps lists the keyed ones too.
Returns
Section titled “Returns”HeldProp | null
getProps()
Section titled “getProps()”getProps():
HeldProp[]
Every prop on your body, keyed or not, in the order they took their slots.
Returns
Section titled “Returns”HeldProp[]
getRotation()
Section titled “getRotation()”getRotation():
Rotator|null
Returns the local pawn’s rotation in degrees, or null before it has spawned.
Returns
Section titled “Returns”Rotator | null
getScale()
Section titled “getScale()”getScale():
number
The local character’s live body scale (1 = native) in either scale mode. Set it server-side with player.setScale.
Returns
Section titled “Returns”number
The scale, or 0 before the character component exists.
identifyGear()
Section titled “identifyGear()”identifyGear():
number
UGearManager::IdentifyAllItems. Gear granted at runtime arrives unidentified; this identifies all of it. Returns the count identified, -1 if the manager isn’t up.
Returns
Section titled “Returns”number
isAimEnabled()
Section titled “isAimEnabled()”isAimEnabled():
boolean
False while any resource holds the local player’s aim off.
Returns
Section titled “Returns”boolean
isAiming()
Section titled “isAiming()”isAiming():
boolean
Whether the player is in aim mode: the aim button is held and the crosshair is up. A lock onto a target alone is not aim mode. False without a pawn or controller.
Returns
Section titled “Returns”boolean
isCastingEnabled()
Section titled “isCastingEnabled()”isCastingEnabled():
boolean
False while any resource holds the local player’s casting off.
Returns
Section titled “Returns”boolean
isDodgeEnabled()
Section titled “isDodgeEnabled()”isDodgeEnabled():
boolean
False while any resource holds the local player’s dodge off.
Returns
Section titled “Returns”boolean
isHoodUp()
Section titled “isHoodUp()”isHoodUp():
boolean
Whether the player’s hood is up. False without a pawn.
Returns
Section titled “Returns”boolean
isJumpEnabled()
Section titled “isJumpEnabled()”isJumpEnabled():
boolean
False while any resource holds the local player’s jump off. The game’s own locks are not counted here; jumpState().locked shows them.
Returns
Section titled “Returns”boolean
isSpellHookInstalled()
Section titled “isSpellHookInstalled()”isSpellHookInstalled():
boolean
Whether the game’s spell-cast hook is live, so the localSpellCast event reports the local player’s casts. False until the game has started its first session.
Returns
Section titled “Returns”boolean
isSprintEnabled()
Section titled “isSprintEnabled()”isSprintEnabled():
boolean
False while any resource holds the local player’s sprint off.
Returns
Section titled “Returns”boolean
jumpState()
Section titled “jumpState()”jumpState():
object
Diagnostic snapshot: enabled mirrors isJumpEnabled(), holders names the resources holding jump off, and locked is whether the game’s jump lock is on right now, which is also true while the game itself locks jumping (a scripted walk, a cutscene).
Returns
Section titled “Returns”object
enabled
Section titled “enabled”enabled:
boolean
holders
Section titled “holders”holders:
string[]
locked
Section titled “locked”locked:
boolean
listActivities()
Section titled “listActivities()”listActivities():
object[]
Every activity and the variants it takes.
Returns
Section titled “Returns”object[]
muteNotifications()
Section titled “muteNotifications()”muteNotifications(
ms?):number
Silences HUD notification banners (pickups, unlocks, XP, missions, tutorials) for a window, then restores the player’s own settings. Login already does this; use it around bulk grants. Returns the window applied.
Parameters
Section titled “Parameters”number
How long to stay quiet; defaults to 3000, capped at 20000.
Returns
Section titled “Returns”number
playAbility()
Section titled “playAbility()”playAbility(
classPath,channel?,suppressIdle?):AbilityHandle
Plays an Able ability on the local player via the game’s own PlayAbilityByClass — the mechanism the game itself uses to animate the avatar — and returns a tracked handle. Other players see it through the Able channel mirror, including players who arrive later or whose copy of you is rebuilt. The handle’s status moves requested → started → ended | interrupted | cancelled, or failed if the play was refused or never appeared on the channel; each transition also fires the abilityStatus event, always after this call returns. A new play on the same channel supersedes the previous handle (it reads interrupted). A refused play still returns a handle, already failed.
Parameters
Section titled “Parameters”classPath
Section titled “classPath”string
An Able ability CLASS path, ending _C (e.g. “/Game/Pawn/Student/Abilities/PartialBody/Waving/ABL_Waving.ABL_Waving_C”).
channel?
Section titled “channel?”string
Able channel — “FullBody” (default) or “PartialBody”.
suppressIdle?
Section titled “suppressIdle?”boolean
Holds the game’s ambient-idle gate for this handle’s lifetime, so the casual idle transitions cannot cut a PartialBody interaction short. Released on every terminal status. While it is held the avatar keeps its current idle and plays no idle breaks; if it was already lounging in casual idle the play waits out the one exit transition that raising the gate commands (up to 4.5 s).
Returns
Section titled “Returns”playClip()
Section titled “playClip()”playClip(
clipPath?,options?):boolean
PLAYS an arbitrary AnimSequence on the local body; pass loop: false, hold: true to hold a static pose. Replicates as state, so other players’ proxies play it too, including players who arrive later: a loop joins in and a held clip shows its last frame. Returns false if the clip has no length or the play head can’t be driven (it stays a static pose).
Parameters
Section titled “Parameters”clipPath?
Section titled “clipPath?”string
An AnimSequence object path; omit or “” to clear.
options?
Section titled “options?”loop and hold default true, rate defaults 1. hold only applies when loop is false: true freezes the last frame, false releases so you can move immediately.
boolean
boolean
number
Returns
Section titled “Returns”boolean
releaseAnchor()
Section titled “releaseAnchor()”releaseAnchor(
exit?):boolean
Ends an anchor and fires anchorReleased with “script”. The player comes back walking, or falling when the anchor held a fall that never landed, so it lands for real. For the next 5 s a body left flying, or walking under a fall that never landed, is put into falling too. False when the player was not anchored.
Parameters
Section titled “Parameters”Where to stand up, at floor level. The pawn lands there through the collision-resolving teleport, so from under a table it comes out clear. With no room there it stands where it was when the anchor began (within 10 m of the seat), and only failing that on the seat. Without an exit it stands up in place and the game pushes it out of whatever it overlaps.
number
number
number
number
Returns
Section titled “Returns”boolean
resetFall()
Section titled “resetFall()”resetFall():
boolean
Treats the local player as just teleported: the next landing deals no fall damage, and a fall after it is measured from where the pawn is now. The game does this itself only after a teleport of more than 1 m. Movement in shorter hops, such as a no-clip flight, stays a fall to the game, and its landing reads about the height gained since it began plus the real drop: past 16 m that kills, setInvulnerableToDamage or not. Call this before collision comes back. Returns false if there’s no pawn.
Returns
Section titled “Returns”boolean
restoreGravity()
Section titled “restoreGravity()”restoreGravity():
boolean
Gives back this resource’s suspendGravity hold. True when gravity is back afterwards; false while another resource still holds it.
Returns
Section titled “Returns”boolean
restorePlayerInput()
Section titled “restorePlayerInput()”restorePlayerInput():
boolean
Gives back this resource’s stopPlayerInput hold. True when input runs afterwards; false while something else still holds it.
Returns
Section titled “Returns”boolean
setAimEnabled()
Section titled “setAimEnabled()”setAimEnabled(
enabled):void
Keeps the local player out of aim mode: the aim button does nothing while it is held, and an aim already up ends. Applied through the game’s own aim lock, which the spell lock leaves open. Same contract as setJumpEnabled: one idempotent hold per resource, off while any resource holds, kept through respawns and travel, dropped when the resource stops or reloads and on disconnect.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
false keeps the local player from aiming; true gives this resource’s hold back.
Returns
Section titled “Returns”void
setCastingEnabled()
Section titled “setCastingEnabled()”setCastingEnabled(
enabled):void
Keeps the local player from casting: the cast button and the spell buttons do nothing while it is held, whether the wand is drawn or stowed. Aim mode (setAimEnabled) and Protego have locks of their own and stay as they are. Applied through the game’s own spell lock, the one the animal form uses. Same contract as setJumpEnabled: one idempotent hold per resource, off while any resource holds, kept through respawns and travel, dropped when the resource stops or reloads and on disconnect.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
false keeps the local player from casting; true gives this resource’s hold back.
Returns
Section titled “Returns”void
setCollision()
Section titled “setCollision()”setCollision(
enable):boolean
AActor::SetActorEnableCollision on the local pawn. Returns false if there’s no pawn.
Parameters
Section titled “Parameters”enable
Section titled “enable”boolean
false lets the pawn pass through world geometry (collision half of noclip).
Returns
Section titled “Returns”boolean
setDodgeEnabled()
Section titled “setDodgeEnabled()”setDodgeEnabled(
enabled):void
Keeps the local player from dodging: the dodge button does nothing while it is held, which covers the dodge roll, the combat dodge and the Swift talent’s hold-to-blink dash. A dodge already under way finishes normally. Applied through the game’s own dodge lock. Same contract as setJumpEnabled: one idempotent hold per resource, off while any resource holds, kept through respawns and travel, dropped when the resource stops or reloads and on disconnect.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
false keeps the local player from dodging; true gives this resource’s hold back.
Returns
Section titled “Returns”void
setGearStat()
Section titled “setGearStat()”setGearStat(
gearId,variation,statName,value):boolean
Writes one stat of an owned gear piece through the game’s own gear manager: “IsIdentified” identifies that one piece (the game has no per-item identify of its own), any integer column of GearItemsDynamic sets that column. The write re-reports the inventory to the server. Returns the game’s verdict.
Parameters
Section titled “Parameters”gearId
Section titled “gearId”string
A GearID from the game’s gear tables.
variation
Section titled “variation”string
The item’s variation name.
statName
Section titled “statName”string
Stat to write: “IsIdentified” or an integer column of GearItemsDynamic.
number
New stat value.
Returns
Section titled “Returns”boolean
setHood()
Section titled “setHood()”setHood(
up):boolean
Raises or lowers the hood of the hooded garment the player wears, as the Equipment menu’s toggle does: other players see it and the worn item’s inventory row follows (hoodUp). Returns false when the hood cannot be raised: no pawn, or nothing worn has a hood. Lowering succeeds whatever is worn.
Parameters
Section titled “Parameters”boolean
true raises the hood, false lowers it.
Returns
Section titled “Returns”boolean
setJumpEnabled()
Section titled “setJumpEnabled()”setJumpEnabled(
enabled):void
Keeps the local player from jumping: the jump button does nothing while it is held, and a jump already in the air lands normally. Applied through the game’s own jump lock, the one its scripted walks use, so it stacks with the game’s locks instead of undoing them. One hold per resource, idempotent; jumping stays off while any resource holds. The hold carries over respawns and travel, and is dropped when the resource stops or reloads and on disconnect, so nothing has to be paired.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
false keeps the local player from jumping; true gives this resource’s hold back.
Returns
Section titled “Returns”void
setPosition()
Section titled “setPosition()”setPosition(
x,y?,z?):boolean
Teleports the local pawn to a world location, preserving facing. Returns false if there’s no pawn.
Parameters
Section titled “Parameters”number | Vector3Like
World-space X coordinate.
number
World-space Y coordinate.
number
World-space Z coordinate.
Returns
Section titled “Returns”boolean
setPropOffset()
Section titled “setPropOffset()”setPropOffset(
pitchOrKey?,yawOrOffset?,roll?,x?,y?,z?,scale?):boolean
Nudges a held prop relative to its socket (replicated with it), so the fit is dialled in live rather than rebuilt per guess: (pitch, yaw, roll, x, y, z, scale) for the keyless prop, (key, offset) for any. Omitted arguments and fields reset to zero, and scale to 1. False when nothing is held under the key; a key over 32 characters throws a RangeError.
Parameters
Section titled “Parameters”pitchOrKey?
Section titled “pitchOrKey?”string | number
The keyless prop’s pitch, or the key of the prop the offset in the next argument is for.
yawOrOffset?
Section titled “yawOrOffset?”number | PropOffset
The keyless prop’s yaw, or after a key the whole offset.
number
number
number
number
scale?
Section titled “scale?”number
Returns
Section titled “Returns”boolean
setRotation()
Section titled “setRotation()”setRotation(
yaw,options?):boolean
Turns the local player’s body. Walking turns it again, as usual. While anchored it turns the anchor. Returns false with no pawn or while riding something.
Parameters
Section titled “Parameters”number
Facing in degrees, world space.
options?
Section titled “options?”camera: true also turns the camera.
camera?
Section titled “camera?”boolean
Returns
Section titled “Returns”boolean
setSprintEnabled()
Section titled “setSprintEnabled()”setSprintEnabled(
enabled):void
Keeps the local player from sprinting: the sprint button does nothing while it is held, and a sprint already running is stopped at once. Applied through the game’s own sprint lock. Same contract as setJumpEnabled: one idempotent hold per resource, off while any resource holds, kept through respawns and travel, dropped when the resource stops or reloads and on disconnect.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
false keeps the local player from sprinting; true gives this resource’s hold back.
Returns
Section titled “Returns”void
setVisibility()
Section titled “setVisibility()”setVisibility(
visible):boolean
Old name of setVisible.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
As setVisible.
Returns
Section titled “Returns”boolean
Deprecated
Section titled “Deprecated”Use setVisible, the name the server’s player.setVisible has.
setVisible()
Section titled “setVisible()”setVisible(
visible):boolean
Whether the local player sees their own body, on this screen only: other players keep seeing them unless the server’s player.setVisible hides them. Effects attached with Fx stay visible. Holds through respawns and travel until changed or the connection closes. Returns false while there is no pawn yet; the choice applies once one spawns.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
false hides the body, wand and held prop; true shows them again.
Returns
Section titled “Returns”boolean
sprintState()
Section titled “sprintState()”sprintState():
object
Diagnostic snapshot for the sprint hold: holders names the resources holding sprint off, and locked is whether the game’s sprint lock is on right now.
Returns
Section titled “Returns”object
enabled
Section titled “enabled”enabled:
boolean
holders
Section titled “holders”holders:
string[]
locked
Section titled “locked”locked:
boolean
startActivity()
Section titled “startActivity()”startActivity(
id,variant?):boolean
Starts an activity: a pose with a companion the game animates itself, replacing one under way. “kite” flies a Magic Kite Battle kite on its rope, its variants the kites and its default your house’s (the phoenix without a house); “fireworks” casts the Fireworks world event’s bursts from your wand; “raincloud” hangs a cloud over you, “rain” or “snow” and snow by default in winter; “snitch” lets a Golden Snitch flit about over your head; “band” conducts the One Man Band’s instruments, playing around you; “howler” opens a Howler that shouts its message, in a “female” or “male” voice (one at random by default), then bursts and ends the activity by itself; “livingbook” opens a living book before you, its variants its effects; “cards” holds up a deck that shuffles itself through its tricks; “pepperup” drinks a Pepper-Up Potion, which sends steam out of your head, and ends the activity by itself once the drink is over. Replicates as state, so other players see it, including players who arrive later. Walking away, stopEmote or any other clip ends it, as finishActivity does. False for an unknown id or variant, without a pawn, dead or mounted. The first start of each kind on a client loads its assets synchronously.
Parameters
Section titled “Parameters”Which activity.
variant?
Section titled “variant?”One of the activity’s variants (listActivities); omit for its default.
Returns
Section titled “Returns”boolean
stopEmote()
Section titled “stopEmote()”stopEmote():
boolean
Clears a held emote or a playClip pose, locally and on other players’ proxies. True when the pose came off this body; false with no local player or no anim instance to clear.
Returns
Section titled “Returns”boolean
stopPlayerInput()
Section titled “stopPlayerInput()”stopPlayerInput():
boolean
Freezes player input via the game’s own pawn-level suppressor (camera look still runs). One hold per resource, kept across respawns and dropped when the resource stops: input stays frozen while anything holds it, another resource or the mod’s own features included. Pair with restorePlayerInput. Always true; with no pawn yet it applies once there is one.
Returns
Section titled “Returns”boolean
suspendGravity()
Section titled “suspendGravity()”suspendGravity():
boolean
Takes the local player’s gravity away, for a flight that carries the player by setPosition with collision off. To the game such a player is falling: holding still for 5 s reads as stuck in a fall, which kills more than 10 m from the last ground, and gravity’s sag between moves adds to the fall a landing reads. One hold per resource, kept across respawns and dropped when the resource stops. Pair with restoreGravity. Always true; with no pawn yet it applies once there is one.
Returns
Section titled “Returns”boolean
unidentifiedGearCount()
Section titled “unidentifiedGearCount()”unidentifiedGearCount():
number
How many unidentified items the player holds, so an identify interaction can be gated on there being something to identify. -1 if the manager isn’t up.
Returns
Section titled “Returns”number
useTool()
Section titled “useTool()”useTool(
itemId):boolean
Uses an inventory tool as picking it on the tool wheel does, with the wheel held shut or not. The game picks the target, runs its own check (showing its own refusal message) and plays the use. The Nab-Sack then draws the beast in and waits at each gate for the player’s own confirm (F, gamepad X), and the catch raises the server’s beastCaptureStart, beastCaptureRequest and beastCaptured as usual. True when the game took the use; false for an item the wheel cannot use (no tool record) or that the player does not hold.
Parameters
Section titled “Parameters”itemId
Section titled “itemId”string
An inventory tool: “CaptureDevice” (the Nab-Sack), “CreaturePettingBrush”, “CreatureFeed”, or a combat plant (“Mandrake_Byproduct”, “ChompingCabbage_Byproduct”, “VenomousTentacula_Byproduct”).
Returns
Section titled “Returns”boolean