Voxel Game Maker

Docs Cookbook

Branching dialogue choice

Dialogue tab: Start ▸ Say ▸ Choice, then a line from each answer to its own Say.

#Without code

  1. Dialogue tab: Start ▸ Say ▸ Choice, then a line from each answer to its own Say.
  2. On the NPC, a Trigger When the player presses E, Then Start dialogue.

#Quick code

Where it goes: on the NPC, Event: Player presses E.

local pick = choice("Help me find my cat?", {"Sure", "Not now"})
if pick == "Sure" then
  start_quest("cat", "Find the lost cat")
else
  popup("Oh. Maybe later then.")
end