Find the Lua Designer
EDITOR TOUR
A script record is a named piece of code in your game. The editor gives it a human-readable name and an ID that other parts of the game can use.
The script list is on the left. The selected workspace is Lua Script Designer. Add New sits next to the record picker.
01. Open the Lua Script workspace. Hover over the workspace icons to read their names. On a narrow screen, scroll the icon strip or select a Lua record in the Adventure Database.
02. In your game, select Add New. Enter first_lua for Script ID and First Lua for Name. If that ID is already in use, give the new record a different one.
The ID is the name you use in code. A space is fine in the display name. Use letters, numbers and underscores in the ID and start it with a letter or underscore.
Leave Keep global instance alive and the event boxes unchecked for now. The script should run when you ask it to. In the right-hand Inspector, enabled should be checked.
Lua scripting / Illustrated guide W04
