Fx
Defined in: server/api.d.ts:2472
A server-owned, interest-streamed visual effect handle (a Niagara or Cascade system placed in the world).
Extends
Section titled “Extends”ServerEntity.ServerEntity
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Fx(
id):Fx
Defined in: server/api.d.ts:2477
Wraps an effect entity id without spawning it.
Parameters
Section titled “Parameters”number
Network id of the server entity to wrap.
Returns
Section titled “Returns”Fx
Methods
Section titled “Methods”attachTo()
Section titled “attachTo()”attachTo(
entity,offset?):boolean
Defined in: server/api.d.ts:2524
Makes the effect ride an entity’s body on every client until detach. Each client moves it onto that body every frame instead of parenting it, so it stays visible while a player is hidden with setVisible. The effect is destroyed when the entity is. False for a missing entity or one of another kind.
Parameters
Section titled “Parameters”entity
Section titled “entity”ServerEntity
A player, NPC, creature, world object or character.
offset?
Section titled “offset?”Offset in cm in the entity’s frame, so it turns with it.
number
number
number
Returns
Section titled “Returns”boolean
destroy()
Section titled “destroy()”destroy():
boolean
Defined in: server/api.d.ts:2517
Destroys this effect entity; every client drops its component.
Returns
Section titled “Returns”boolean
detach()
Section titled “detach()”detach():
boolean
Defined in: server/api.d.ts:2529
Leaves an attached effect where its entity is. False when it was not attached.
Returns
Section titled “Returns”boolean
setColor()
Section titled “setColor()”setColor(
name,color):boolean
Defined in: server/api.d.ts:2536
Overrides a color parameter of a Niagara effect on every client, including late joiners. Only systems that expose the color as a LinearColor user parameter change; others, and Cascade effects, ignore it. Calling it again with the same name replaces the color. False for a fifth distinct name or a name over 64 characters.
Parameters
Section titled “Parameters”string
The system’s LinearColor user parameter, e.g. ‘User.Color’.
Linear color; values above 1 glow. Alpha defaults to 1.
number
number
number
number
Returns
Section titled “Returns”boolean
setVirtualWorld()
Section titled “setVirtualWorld()”setVirtualWorld(
world,map?):void
Defined in: server/api.d.ts:2562
Moves this entity into another virtual world, within a map: there it meets the players in the same world of the same map, so world N of a dungeon is one instance of it.
Parameters
Section titled “Parameters”number
Virtual-world identifier used to partition replication and visibility.
string
The map it is in, as player.location().areaId names it; “Overland” or “” for the shared map. Left out, it stays in its current map.
Returns
Section titled “Returns”void
setVisibleTo()
Section titled “setVisibleTo()”setVisibleTo(
player):void
Defined in: shared.d.ts:82
Restricts replication to one player’s connection, within the usual range and visibility checks; null lifts it.
Parameters
Section titled “Parameters”player
Section titled “player”Entity | null
Returns
Section titled “Returns”void
toString()
Section titled “toString()”toString():
string
Defined in: shared.d.ts:74
Returns
Section titled “Returns”string
catalog()
Section titled “catalog()”
staticcatalog():object[]
Defined in: server/api.d.ts:2555
Curated shipped effect systems (fire, explosions, smoke, weather, water, ambient, magic). A starting point, not an allowlist: any well-formed effect path spawns.
Returns
Section titled “Returns”object[]
create()
Section titled “create()”
staticcreate(key,path,opts):Fx|undefined
Defined in: server/api.d.ts:2544
Creates or replaces an interest-streamed visual effect that every client in range renders.
Parameters
Section titled “Parameters”string
Stable string key; creating again replaces the entity.
string
Niagara or Cascade system asset path (‘/Game/VFX/…/VFX_NS_X.VFX_NS_X’). Throws when malformed.
Placement (x, y, z, pitch, yaw, roll, scale), ttl in seconds, streamRange and drawDistance in cm.
Returns
Section titled “Returns”Fx | undefined
destroy()
Section titled “destroy()”
staticdestroy(key):boolean
Defined in: server/api.d.ts:2550
Destroys the effect stored under a stable key.
Parameters
Section titled “Parameters”string
Stable key passed to create.
Returns
Section titled “Returns”boolean
Properties
Section titled “Properties”attachedTo
Section titled “attachedTo”
readonlyattachedTo:number
Defined in: server/api.d.ts:2497
Network id of the entity it rides, or 0 when placed.
drawDistance
Section titled “drawDistance”drawDistance:
number
Defined in: server/api.d.ts:2507
Client cull distance in cm: players who have the effect stop drawing it beyond this. 0 never culls; -1 is the default and keeps the system’s own culling. Set, a Niagara effect also leaves the game’s scalability culling, so it keeps simulating while out of view. A change that crosses -1 restarts the effect on clients.
readonlyid:number
Defined in: shared.d.ts:65
Network id, stable for the entity’s lifetime.
readonlypath:string
Defined in: server/api.d.ts:2482
Effect-system asset path this effect renders.
position
Section titled “position”position:
Vector3
Defined in: shared.d.ts:67
World position. Read, call set(...), then assign back.
rotation
Section titled “rotation”rotation:
Vector3|Quaternion
Defined in: shared.d.ts:69
Reads as a quaternion; assignments also accept Euler angles in degrees.
readonlyscale:number
Defined in: server/api.d.ts:2487
Uniform scale.
readonlystate:StateBag
Defined in: shared.d.ts:71
This entity’s key/value state: the server writes it, and every client that can see the entity receives it. See StateBag.
streamRange
Section titled “streamRange”streamRange:
number
Defined in: server/api.d.ts:2502
Interest radius in cm: only players this close receive the effect. Clamped to 100-200000; default 50000 (500 m).
readonlyttl:number
Defined in: server/api.d.ts:2492
Seconds until the server destroys it, or 0 when it lives until destroy.
virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: server/api.d.ts:2512
The virtual world scripts put this entity in. Outside the shared map (Overland) replication combines it with the entity’s map, as it does a player’s.