equal
deleted
inserted
replaced
5 This page is a brief overview of how the [LuaAPI Lua API] in Hedgewars is structured. For a beginner's guide, see [LuaGuide]. |
5 This page is a brief overview of how the [LuaAPI Lua API] in Hedgewars is structured. For a beginner's guide, see [LuaGuide]. |
6 |
6 |
7 == How Hedgewars handles Lua scripts == |
7 == How Hedgewars handles Lua scripts == |
8 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. |
8 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. |
9 |
9 |
10 == Tutorial missions == |
10 == Missions == |
11 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. |
11 Missions are located within text files inside `share/hedgewars/Data/Missions/`. The game will list all files with the `.lua` extension inside this directory in the missions and campaigns selection screens. You’ll find some scripts within this directory that contain several comments on the script lines and what they do. |
12 |
12 |
13 See [Missions] for details. |
13 See [Missions] for details. |
14 |
14 |
15 == Special maps == |
15 == Special maps == |
16 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. |
16 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. |