Edited wiki page LuaGuide through web user interface.
--- a/LuaGuide.wiki Sat Nov 13 23:03:11 2010 +0000
+++ b/LuaGuide.wiki Sun Nov 14 00:14:22 2010 +0000
@@ -8,4 +8,33 @@
A Lua script is used to make the game behave different by giving the Hedgewars engine different command. The script gets called by the engine on different events and the script tells the engine what to do.
-Missions and Training are the parts of Hedgewars that are scripted. Try them out and get a feel of what scripted maps is.
\ No newline at end of file
+Missions and Training are the parts of Hedgewars that are scripted. Try them out and get a feel of what scripted maps is.
+
+== The basic structure ==
+
+Dependent on what type of script you want to write the requirements are a bit different, but before we go into that we must first create the .lua file.
+
+If you want to make a Mission for multi player you create a map and create a new file map.lua in the map's folder.
+
+If you want to make a Training or Campaign (coming) then you create a new .lua file in the appropriate folder under Missions in the Data folder.
+
+The .lua file should be structured like this:
+{{{
+function onGameInit()
+end
+
+function onAmmoStoreInit()
+end
+
+function onGameStart()
+end
+
+function onGameTick()
+end
+
+function onGearAdd(gear)
+end
+
+function onGearDelete(gear)
+end
+}}}
\ No newline at end of file