Skip to content
ASArcaneMP Scripting APIScripting reference
Global objectClient APIGenerated

Blueprints

const Blueprints: object

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

Blueprint actors from a mod pak, spawned on this client only and driven by reflection: call their functions, read and write their variables, and hear their events as blueprintEvent. Values are booleans, numbers, strings (FString and FName), { x, y, z } for a vector or a rotator (pitch, yaw, roll), and a handle for a reference to another Blueprint this resource spawned. A handle belongs to the resource that spawned it: no other resource can use it, and its actor is destroyed when that resource stops.

call(handle, functionName, args?): Record<string, string | number | boolean | { x: number; y: number; z: number; }> | null

Calls a function on a spawned Blueprint.

number

A handle returned by spawn.

string

A function or custom event on the Blueprint or any parent class.

Record<string, string | number | boolean | { x: number; y: number; z: number; }>

Inputs by parameter name; one left out is its default-constructed value.

Record<string, string | number | boolean | { x: number; y: number; z: number; }> | null

Its outputs by name (the return value as ReturnValue, and a by-reference input as the callee left it), or null when the handle, the function or an argument was refused, or the function is an event the Blueprint does not implement.

destroy(handle): boolean

Destroys one spawned Blueprint and drops its watches.

number

A handle returned by spawn.

boolean

destroyAll(): number

Destroys every Blueprint this resource spawned.

number

How many were still live.

get(handle, property): string | number | boolean | { x: number; y: number; z: number; } | undefined

Reads a variable.

number

A handle returned by spawn.

string

A variable on the Blueprint or any parent class.

string | number | boolean | { x: number; y: number; z: number; } | undefined

Its value, or undefined when it is missing or of a type this bridge does not carry.

isValid(handle): boolean

Whether the actor behind a handle is still alive.

number

A handle returned by spawn.

boolean

preload(classPath): boolean

Loads a Blueprint class ahead of its first spawn. The load is synchronous and can take most of a second cold, so do it when the resource starts.

string

Class asset path, e.g. /Game/Mods/MyMod/BP_Thing.BP_Thing_C.

boolean

Whether the class loaded and is a Blueprint actor.

set(handle, property, value): boolean

Writes a variable in place. No setter or RepNotify runs.

number

A handle returned by spawn.

string

A variable on the Blueprint or any parent class.

string | number | boolean | { x: number; y: number; z: number; }

The new value, of the variable’s own type.

boolean

False when the variable is missing, the value is of another type, or a number does not fit the variable.

spawn(classPath, x, y?, z?, options?): number

Spawns a Blueprint actor on this client only. It lives until destroy, destroyAll, a world reload, disconnect, or this resource stopping.

string

Class asset path, e.g. /Game/Mods/MyMod/BP_Thing.BP_Thing_C.

number | Vector3Like

World-space X coordinate.

number

World-space Y coordinate.

number

World-space Z coordinate.

Yaw in degrees; variables to set before the construction script and BeginPlay run; and functions to watch from before those run, which is the only way to hear them.

Record<string, boolean | number | string | { x: number; y: number; z: number; }>

string[]

number

number

A handle, or 0 when the class did not load, is not a Blueprint actor, or a prop or watch was refused.

watch(handle, functionName): boolean

Raises blueprintEvent(handle, functionName, params) each time the engine dispatches that function on this actor: engine events, timers, input and Event Dispatcher bindings. A call one Blueprint graph makes into another is not dispatched that way and is not heard.

number

A handle returned by spawn.

string

The event or function to hear.

boolean

False when the handle or the function is unknown, the function is an event the Blueprint does not implement, or 64 watches are already held.