LocalNpc
Client only. An NPC body shown only on this machine, for things a resource puts in front of its own player, such as a figure in a character creator, a guide or a preview. The server does not know about it, and no other player sees it. Without AI it stays where you put it. `ai: true` gives it the soul's brain, which a female NPC always has. A machine can have up to 64, and they end when their resource stops.
localNpc.create()
LocalNpc.create(options)Creates a body shown only on this machine.
localNpc.all()
LocalNpc.all()Your resource's local NPCs.
localNpc.id
id: numberIts id on this machine.
localNpc.name
name: stringIts name.
localNpc.position
position: Vector3Its location.
localNpc.rotation
rotation: QuaternionThe direction it faces.
localNpc.appearance
appearance: objectIts character parts: { body, head, hair, beard }.
localNpc.exists
exists: booleanFalse once removed.
localNpc.setPosition
setPosition: (position, rotation?) => booleanMoves the body, and turns it if a rotation is given.
localNpc.setAppearance
setAppearance: (request) => booleanChanges character parts of its gender, as for Npc.setAppearance.
localNpc.playAnimation
playAnimation: (fragment, options?) => booleanPlays one of the game's animations, as for Npc.playAnimation.
localNpc.stopAnimation
stopAnimation: () => booleanEnds what playAnimation started.
localNpc.say
say: (text, options?) => booleanShows the game's speech bubble over its head. '' removes it.
localNpc.remove
remove: () => voidRemoves the body from this machine's world.