Difference between revisions of "An Introduction to Scripting with LUA"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Basic Syntax (▲))
Line 4: Line 4:
 
== Basic Syntax ([[#top|<b>▲</b>]]) ==
 
== Basic Syntax ([[#top|<b>▲</b>]]) ==
  
{| class="wikitable" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
+
{| class="wikitable mw-collapsible" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 +
|-
 +
! colspan="2" | <b>Basic Commands</b>
 
|-
 
|-
 
| <span style="color:#cdad00"><b>if</b></span> || <b>allows us to query if something: equals, does not equal, is less/more than x value etc ...</b>
 
| <span style="color:#cdad00"><b>if</b></span> || <b>allows us to query if something: equals, does not equal, is less/more than x value etc ...</b>
 
|-
 
|-
| colspan="2"|
+
| colspan="2" |
 
<syntaxhighlight>
 
<syntaxhighlight>
 
if condition then -- this queries if (boolean) condition equals true then do some action!
 
if condition then -- this queries if (boolean) condition equals true then do some action!

Revision as of 21:34, 23 February 2013

I have decided to write an introduction into the basics of LUA Script; so that you can get a better understanding of how it works & how you can apply it within the Visionaire Studio™ editor, to further enhance your games!

Basic Syntax ()

Basic Commands
if allows us to query if something: equals, does not equal, is less/more than x value etc ...
if condition then -- this queries if (boolean) condition equals true then do some action!
if condition == true then -- this is also a valid way for seeing if a (boolean) condition equals true!
if not condition then -- this checks if (boolean) condition equals false!
if condition == false then -- this is also valid for checking if a (boolean) condition equals false!
Example Example
Example Example
Example Example
Example Example
Example Example
Example Example
Example Example
Example Example
Example Example
if
else
end