Moved TOC a little bit further down.
authoralmikes@aol.com
Wed, 17 Dec 2014 22:02:15 +0000
changeset 519 b757c990bd5c
parent 518 98556ba89788
child 520 b006de5eeed1
Moved TOC a little bit further down.
LuaAPI.wiki
--- a/LuaAPI.wiki	Wed Dec 17 21:56:56 2014 +0000
+++ b/LuaAPI.wiki	Wed Dec 17 22:02:15 2014 +0000
@@ -1,6 +1,5 @@
 #summary API for writing Lua scripts in Hedgewars.
 #labels Featured
-<wiki:toc max_depth="4" />
 
 == Introduction ==
 
@@ -8,24 +7,23 @@
 
 Lua is an easy to learn scripting language that’s implemented using open source libraries. If you’d like to learn more about Lua, have a look at [http://www.lua.org Lua's official homepage]. Even though its easy to learn syntax this wiki page won't explain all basics of using Lua, e.g. declaring variables or using control structures. There are tons of step-by-step tutorials and documentation available on the internet. Just throw “Lua” into your favourite search engine and give it a try.
 
+=== About this wiki page ===
+This page tends to become outdated. For a list of undocumented functions, see [http://hw.ercatec.net/docs/lua_wiki_check.php].
 
+<wiki:toc max_depth="4" />
+
+== Overview ==
 === How Hedgewars handles Lua scripts ===
 As of Version 0.9.20, Hedgewars supports Lua scripts for two similar tasks: Define tutorial missions, campaign missions or provide special map behaviour for precreated maps. It is also used for multiplayer scripts to create new game styles.
 
-=== About this wiki page ===
-This page tends to become outdated. For a list of undocumented functions, see [http://hw.ercatec.net/docs/lua_wiki_check.php].
-
-
 === Tutorial missions ===
 Tutorial missions are located within text files inside `share/hedgewars/Data/Missions/Training`. The game will list all files with the lua extension inside this directory in the Training selection screen. You’ll find some premade example scripts within this directory that contain several comments on the script lines and what they do.
 
-
 === Special maps ===
 In addition to tutorial missions predrawn maps (maps not created using the random map creator) may contain a single lua script file named `map.lua`. If it’s there, it will be used once the map is played. This way it’s possible to play maps alone or over the internet using custom goals. Mission maps can be found in singleplayer mode under the “training” button and in multiplayer mode, it is selectable as a map type.
 
 See also [PresetMaps] for more information about such maps.
 
-
 === How Lua scripts are used ===
 Several parts of script files are executed multiple times. In general, the whole script file is read while loading the map. Declarations as well as function calls outside functions are executed at once. Later on the game will call special predefined function names at special occassions such as the creation of new game objects (called “gears”).