Difference between revisions of "Lua"

From NS2 community wiki
Jump to: navigation, search
(Preparing this article for future lua documentation)
Line 36: Line 36:
 
{|width="100%"
 
{|width="100%"
 
|-
 
|-
|width="25%" style="border: solid 2px blue; background: #330099;"|[[Image:Entity.gif]][[entity_hooks|Entity Hooks]]
+
|width="25%" style="border: solid 2px blue; background: #0099FF;"|[[Image:Entity.gif]][[entity_hooks|Entity Hooks]]
|width="25%" style="border: solid 2px blue; background: #330099;"|[[Image:Gamemode.gif]][[game_hooks|Game Hooks]]
+
|width="25%" style="border: solid 2px blue; background: #0099FF;"|[[Image:Gamemode.gif]][[game_hooks|Game Hooks]]
 
|-
 
|-
  

Revision as of 11:09, 28 August 2009

What is Lua?

Lua is a scripting language with a simple syntax. On NS2 99% of the game is made on Lua and it will allow users to make their own modifications. Since it can be easily implemented in any application it is used in other games such as Garry's Mod, World of Warcraft, Far Cry, and more...

Visit the lua official site or the Wikipedia article for more information.



There is not much of Lua documentation for NS2. All we can get for now is from armory lua code, seen here http://www.unknownworlds.com/ns2/news/2007/02/prosumers_and_natural_selection_2.


Note: These functions below are taken from armory lua code and therefor all the descriptions might not explain what the function does in final version. Most of these functions may not be on final version too.

There's also a number of events for entities:


Lua Documentation:

Entity.gifEntity Hooks Gamemode.gifGame Hooks