MegaGlest Forum
Modding and game content creation => Maps, tilesets and scenarios => Topic started by: martiño on 29 May 2008, 13:55:28
-
All scripting documentation has been ported to the wiki:
- Scripting overview: https://docs.megaglest.org/Lua
- MegaGlest functions: https://docs.megaglest.org/MG/Lua
- GAE functions: https://docs.megaglest.org/GAE/Lua
- Vanilla Glest functions: https://docs.megaglest.org/Lua/Commands
From 3.2, Glest includes scripted scenarios using Lua.
The Lua code is embedded in the scenario xml file, and each chunk is assigned to an event, that gets called when something specific happens in the game.
The best way of learning it is to take a look at the already existing scripted scenarios: storming, basic_tutorial and advanced_tutorial.
-
Is there a list of available features that can be used, or am I on my on for that?
-
There's a set number of features, but Lua does leave some room for doing things your own way, but no real way to get new things in.
Hey Martino, can you add a function for placing units on an X,Y grid? It'd be extremely helpful and probably easy to code.