Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

Routine

The steps of one routine, one method each, in the order it runs them.

new Routine(): Routine

Routine

face(): Routine

Turns toward the player’s character nearest to it: the one who came close or pressed its prompt.

Routine


on(event, name): Routine

Starts the routine name on event, only while in this routine.

Parameter Type
event NpcEvent
name string

Routine


play(clip): Routine

Plays clip, a clip its avatar has.

Parameter Type
clip string

Routine


resume(): Routine

Goes back to the routine an event interrupted, at the step it was on, once the last step is done: how a routine an event starts ends when it names no other way out.

Routine


say(line): Routine

Shows line over its head for a few seconds, and goes on.

Parameter Type
line string

Routine


then(name): Routine

Goes to the routine name once the last step is done.

Parameter Type
name string

Routine


turn(degrees): Routine

Turns on the spot by degrees, left for a positive number.

Parameter Type
degrees number

Routine


wait(seconds): Routine

Stands for seconds, or for a roll { between: [min, max] }.

Parameter Type
seconds WaitSeconds

Routine


walk<Point>(route, walkOptions?): Routine

Walks route once, pausing where pause says, and repeat more times; the step ends with the last pass.

Type Parameter Default type
Point extends string never
Parameter Type
route Route<Point>
walkOptions WalkOptions<NoInfer<Point>>

Routine