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

dialog

dialog(name): DialogBuilder<Record<never, never>>

Starts the builder of a conversation named name, on its named values, which a line reads as {name} and a condition or an action reads by name: dialog("herbalist", { price: 5 }).node(...).start("hello"). The machine is named for name, so every NPC handed one build runs one machine. A value’s name holds letters, digits and underscores. A dialog with no values takes its name alone: dialog("guard").

Parameter Type
name string

DialogBuilder<Record<never, never>>

dialog<Values>(name, values): DialogBuilder<Values>

Starts the builder of a conversation named name, on its values.

Type Parameter
Values extends Readonly<Record<string, DialogValue>>
Parameter Type
name string
values Values & CheckedNames<Values>

DialogBuilder<Values>