Skip to content
ASArcaneMP Scripting APIScripting reference
Global objectClient APIGenerated

LocalPlayer

const LocalPlayer: object

Defined in: client/api.d.ts:3369

The local player and its native-component controls.

readonly gait: LocalPlayerGait

Walk/jog locomotion, including the RP walk-by-default inversion.

readonly stateInfo: LocalPlayerStateInfo

Curated death / health / invulnerability state controls on the CharacterStateInfo component.

readonly wand: LocalPlayerWand

Draw, stow and restyle the local player’s wand.

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.

number | AbilityHandle

A handle from playAbility, or its id.

"unknown" | "started" | "ended" | "interrupted" | "failed" | "requested" | "cancelled"

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.

object

enabled: boolean

holders: string[]

locked: boolean

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.

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.

boolean

boolean

number

number

number

number

boolean

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.

string

A slot name from gearSlots; matched case-insensitively.

GearItem[] | null

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.

string

Able channel to clear; defaults to “PartialBody”.

boolean

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.

number | AbilityHandle

A handle from playAbility, or its id.

boolean

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.

object

enabled: boolean

holders: string[]

locked: boolean

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.

string

The key the prop was equipped under; omitted, the keyless prop.

boolean

clearVelocity(): boolean

Clears local movement velocity. Returns false without a pawn or movement component.

boolean

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.

object

enabled: boolean

holders: string[]

locked: boolean

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.

clip and emote set what the figure plays; show spawns or drops it. Omit everything to just read the state back.

string

string

boolean

boolean

EmotePreviewTuning

EmotePreviewState

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.

Record<string, GearItem | null> | null

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.

string

A StaticMesh OR SkeletalMesh asset path — the asset kind picks the actor class and the setter.

string | PropOptions

The body-mesh socket of the keyless prop, or the options; the socket defaults to “WandSocket”.

boolean

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.

boolean

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.

string

An ABiped_Player FGameplayProperty_Float — OffenseStat, DefenseStat, CooldownStat, StatDamageMultiplier, StatDamageReduction, …

string

Which field to read: “Current” (default), “Base”, “Min” or “Max”.

number | null

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.

string[]

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.

string

The GearID, e.g. from availableGear or an inventory row.

string

That item’s variation; “” reads the row stored as None.

GearItemStats | null

getActivity(): { id: ActivityId; variant: ActivityVariant | ""; } | null

The activity under way and its variant (“” for one without variants), or null.

{ id: ActivityId; variant: ActivityVariant | ""; } | null

getAnchor(): { x: number; y: number; yaw: number; z: number; } | null

The floor-level point and facing the player is anchored at, or null.

{ x: number; y: number; yaw: number; z: number; } | null

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.

string

A bone or socket of the body’s skeleton, e.g. “head” or “WandSocket”.

number

A player whose body this client draws; omit for the local one.

{ 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(): Rotator | null

Returns the live controller rotation, or null without a pawn/controller.

Rotator | null

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.

LocalHazard[]

getPosition(): Vec3 | null

Returns the local pawn’s world location, or null before it has spawned.

Vec3 | null

getProp(): HeldProp | null

The keyless prop on your body, or null when none is held; getProps lists the keyed ones too.

HeldProp | null

getProps(): HeldProp[]

Every prop on your body, keyed or not, in the order they took their slots.

HeldProp[]

getRotation(): Rotator | null

Returns the local pawn’s rotation in degrees, or null before it has spawned.

Rotator | null

getScale(): number

The local character’s live body scale (1 = native) in either scale mode. Set it server-side with player.setScale.

number

The scale, or 0 before the character component exists.

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.

number

isAimEnabled(): boolean

False while any resource holds the local player’s aim off.

boolean

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.

boolean

isCastingEnabled(): boolean

False while any resource holds the local player’s casting off.

boolean

isDodgeEnabled(): boolean

False while any resource holds the local player’s dodge off.

boolean

isHoodUp(): boolean

Whether the player’s hood is up. False without a pawn.

boolean

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.

boolean

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.

boolean

isSprintEnabled(): boolean

False while any resource holds the local player’s sprint off.

boolean

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).

object

enabled: boolean

holders: string[]

locked: boolean

listActivities(): object[]

Every activity and the variants it takes.

object[]

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.

number

How long to stay quiet; defaults to 3000, capped at 20000.

number

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.

string

An Able ability CLASS path, ending _C (e.g. “/Game/Pawn/Student/Abilities/PartialBody/Waving/ABL_Waving.ABL_Waving_C”).

string

Able channel — “FullBody” (default) or “PartialBody”.

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).

AbilityHandle

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).

string

An AnimSequence object path; omit or “” to clear.

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

boolean

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.

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

boolean

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.

boolean

restoreGravity(): boolean

Gives back this resource’s suspendGravity hold. True when gravity is back afterwards; false while another resource still holds it.

boolean

restorePlayerInput(): boolean

Gives back this resource’s stopPlayerInput hold. True when input runs afterwards; false while something else still holds it.

boolean

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.

boolean

false keeps the local player from aiming; true gives this resource’s hold back.

void

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.

boolean

false keeps the local player from casting; true gives this resource’s hold back.

void

setCollision(enable): boolean

AActor::SetActorEnableCollision on the local pawn. Returns false if there’s no pawn.

boolean

false lets the pawn pass through world geometry (collision half of noclip).

boolean

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.

boolean

false keeps the local player from dodging; true gives this resource’s hold back.

void

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.

string

A GearID from the game’s gear tables.

string

The item’s variation name.

string

Stat to write: “IsIdentified” or an integer column of GearItemsDynamic.

number

New stat value.

boolean

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.

boolean

true raises the hood, false lowers it.

boolean

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.

boolean

false keeps the local player from jumping; true gives this resource’s hold back.

void

setPosition(x, y?, z?): boolean

Teleports the local pawn to a world location, preserving facing. Returns false if there’s no pawn.

number | Vector3Like

World-space X coordinate.

number

World-space Y coordinate.

number

World-space Z coordinate.

boolean

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.

string | number

The keyless prop’s pitch, or the key of the prop the offset in the next argument is for.

number | PropOffset

The keyless prop’s yaw, or after a key the whole offset.

number

number

number

number

number

boolean

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.

number

Facing in degrees, world space.

camera: true also turns the camera.

boolean

boolean

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.

boolean

false keeps the local player from sprinting; true gives this resource’s hold back.

void

setVisibility(visible): boolean

Old name of setVisible.

boolean

As setVisible.

boolean

Use setVisible, the name the server’s player.setVisible has.

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.

boolean

false hides the body, wand and held prop; true shows them again.

boolean

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.

object

enabled: boolean

holders: string[]

locked: boolean

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.

ActivityId

Which activity.

ActivityVariant

One of the activity’s variants (listActivities); omit for its default.

boolean

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.

boolean

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.

boolean

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.

boolean

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.

number

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.

string

An inventory tool: “CaptureDevice” (the Nab-Sack), “CreaturePettingBrush”, “CreatureFeed”, or a combat plant (“Mandrake_Byproduct”, “ChompingCabbage_Byproduct”, “VenomousTentacula_Byproduct”).

boolean