Ember is discontinued. It still works, but it gets no more updates or support. Back to uayi.org
Home · Terrified Gorillas · Glimmerwood · Starfall Hollow · ‹ Prev Next ›
Ember
Download

Scripting

Code window and Text to Code

The Code window

Code > Code Editor, or double-click a .lua file in Assets.

New Script

Code > New Script… makes a script from a template and can attach it to the selected object:

Template What it does
Empty behaviour start and update, nothing else
Player controller WASD / stick to walk, Space to jump, with a physics body
Follow camera a third-person camera that follows an object
Collectible spins, bobs, disappears and scores when the Player touches it
Enemy chase walks towards the Player when it is close
Door / trigger zone opens (moves up) while something stands in the zone
Spawner creates a falling crate every few seconds
HUD score and timer on screen
Terrain digger click the ground to dig, Shift+click to build up

Text to Code

Code > Text to Code…: type what should happen in English and see it three ways:

Save as Blocks or Save as Lua writes it into scripts/ (with a new name if that file already exists) and can attach it to the selected object.

It uses the same offline, rule-based parser as Write it in words, so it can be inaccurate. Read the steps before relying on them.

Ember 1.1 documentation. Found a mistake? The source of this page is site/docs/code-window.md in the Ember source.