UevKF8zjRV_WEtpJsXhr
We use cookies on this site to enhance your user experience

Finishing the Story

5 - 10 mins

Finishing the Story

Keep adding to your game by adding more variables, questions, and concatenating strings.

  1. Add more lines to your story
  2. Playtest the game every time you add a new set of variables and strings

Tips and Tricks

Use Variables More Than Once

Variables can be used more than once — just use concatenation between strings where you want to include the word(s).

Example Code
local story = "In a tree on a hill lives the great wizard " .. name1 .. ". " .. "Every morning, " .. name1 .. " loves eating a giant bowl of honey roasted " .. food1 .. " . "
Result
In the tree on a hill lives the great Wizard Sameth. Every morning, Sameth loves eating a giant bowl of honey roasted potatoes.

Add Line Breaks

Line breaks can be added by typing \n in a string .

With One Line Break

Example Code
local story = "In a tree on a hill lives the great wizard " .. name1 .. ". " .. "\nEvery morning, " .. name1 .. " loves eating a giant bowl of honey roasted " .. food1 .. " . "
Result
In the tree on a hill lives the great Wizard Sameth.
Every morning, Sameth loves eating a giant bowl of honey roasted potatoes.

With Two Line Breaks Together

Example Code
local story = "In a tree on a hill lives the great wizard " .. name1 .. ". " .. "\n\nEvery morning, " .. name1 .. " loves eating a giant bowl of honey roasted " .. food1 .. " . "
Result
In the tree on a hill lives the great Wizard Sameth.

Every morning, Sameth loves eating a giant bowl of honey roasted potatoes.