Skip to main content

Getting Started

Scripting is only available in the native client.

Access the scripts folder by pressing CTRL + L to open the Lua menu. Then select the scripts folder button.


Watch this video for an intro to scripting and the native client editor.

Lua

Lua is the scripting language used in Atomontage. A good resource to learn Lua is Learn Lua in 5 minutes

Lua Basics

Lua keeps things simple. There are only a handful of types, everything else is built on top and chats with our APIs:

  • nil → absence of a value
  • booleantrue or false
  • number → all numbers (integers + floats)
  • string → text values
  • table → the only data structure (works as arrays, dictionaries, or objects)
  • function → first-class functions you can assign, pass around, and call

Examples

local x = 10           -- number
local name = "Cortex" -- string
local isActive = true -- boolean
local nothing = nil -- nil
local list = {1, 2, 3} -- table as array
local user = {name = "Data", age = 25} -- table as dictionary

function greet(person)
print("Hello " .. person)
end

greet(user.name) -- Hello Data