LuaAPI.wiki
changeset 567 17cf8a0c007f
parent 564 c002f49283c6
child 572 dd27ba1f54a6
equal deleted inserted replaced
566:dc9a1250fe28 567:17cf8a0c007f
    16 === How Hedgewars handles Lua scripts ===
    16 === How Hedgewars handles Lua scripts ===
    17 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.
    17 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.
    18 
    18 
    19 === Tutorial missions ===
    19 === Tutorial missions ===
    20 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.
    20 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.
       
    21 
       
    22 See [Missions] for details.
    21 
    23 
    22 === Special maps ===
    24 === Special maps ===
    23 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.
    25 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.
    24 
    26 
    25 See also [PresetMaps] for more information about such maps.
    27 See also [PresetMaps] for more information about such maps.