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

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Basic Syntax (▲))
(Basic Syntax (▲))
Line 36: Line 36:
 
| Example || Example
 
| Example || Example
 
|}
 
|}
 
<syntaxhighlight>
 
if
 
else
 
end
 
</syntaxhighlight>
 
 
 
{{i18n|Manual}}
 
{{i18n|Manual}}

Revision as of 23:06, 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