Getting Started
From MechaSource Wiki
| Getting Started | |
|---|---|
| Step 1. Basic Lua | |
| |
| Step 2. Lua Structure | |
| Step 3. Basic MechaSource | |
This tutorial will guide you through the basics of Lua and hopefully help you on your way to develop your own applications.
[edit] Introduction
In this article, you will learn how to use Lua for MechaSource.
Before we start off, make sure you have the following tools
Lua is a relatively easy scripting language. It consists mainly of functions. A function is called in a very simple manner: name(parameter1, parameter2, ...).
Let us start out with something relatively easy. One of the most common functions is the print function. It prints the text of its parameters. Start a new project in MechaSource SDK. Now lets try to print "Hello World!".
print("Hello World!")
Will print "Hello World!" in the console (can be viewed by pressing F1). Run your script and look for yourself! Notice the use of quotationmarks ("), this tells Lua that it is a string, not variable (more on that later).
Congratulations, you've said hello to the world!
|
Getting Started |
Functions |
