Lua Reference

This is the reference for the Eternus Scripting Engine used in TUG. Most of the functions to interface with the game are exposed through the global function Eternus.

Globals

 * Returns, an interface to the Eternus Scripting Engine.
 * Returns, an interface to the Eternus Scripting Engine.

EternusInterface
This is the main interface to the game. To get a sub-interface, call one of the following functions, eg:

local terrainGen = Eternus:Terrain   --  Get the terrain generator interface


 * Returns, for getting the current game state, etc.
 * Returns, for getting the current game state, etc.


 * Returns, for posting error messages, etc.
 * Returns, for posting error messages, etc.


 * Returns, an interface to the physics system.
 * Returns, an interface to the physics system.


 * Returns, an interface to the terrain generator.
 * Returns, an interface to the terrain generator.


 * Returns, for modifying the user interface.
 * Returns, for modifying the user interface.

DebugInterface
This is used for posting error messages, etc.

Eternus:Output:DebugPrint("An error occurred!")   --  Show an alert box to the user


 * Shows an error message alert box to the user.
 * Shows an error message alert box to the user.

GameStateInterface
Use this interface to get game state info, etc.

PhysicsInterface
An interface to the physics engine.

TerrainInterface
Interface to the terrain generator.

UIInterface
Use this to interact with the user interface.

Vec3
A vector with 3 points. It can be added, subtracted, multiplied and divided by other Vec3 objects.

local v1 = Vec3.new(1, 2, 3)         --  Create a vector local v2 = v1 + Vec3.new(5, 6, 7)    --  Add another vector to it


 * Creates a new Vec3 object.
 * Creates a new Vec3 object.


 * Returns the X value
 * Returns the X value


 * Returns the Y value
 * Returns the Y value


 * Returns the Z value
 * Returns the Z value