LuaGuide.wiki
changeset 1416 ea8b1317e8f3
parent 1415 36f16bdf8440
child 1727 6d99747d81e3
equal deleted inserted replaced
1415:36f16bdf8440 1416:ea8b1317e8f3
    12 == Lua in Hedgewars ==
    12 == Lua in Hedgewars ==
    13 Version 0.9.13 of Hedgewars introduced the ability to use Lua scripts to modify Hedgewars behaviour for different maps. The use of Lua scripts has been extended since then.
    13 Version 0.9.13 of Hedgewars introduced the ability to use Lua scripts to modify Hedgewars behaviour for different maps. The use of Lua scripts has been extended since then.
    14 
    14 
    15 Now, Lua scripts are used for:
    15 Now, Lua scripts are used for:
    16 
    16 
    17 * [Missions], one of three types:
    17  * [Missions], one of three types:
    18     * Training: Easy missions which explain the game, like a tutorial
    18     * Training: Easy missions which explain the game, like a tutorial
    19     * Challenge: Missions in which the goal is to reach a high score
    19     * Challenge: Missions in which the goal is to reach a high score
    20     * Scenario: Missions with a pre-set goal, like collecting a crate or killing all enemies
    20     * Scenario: Missions with a pre-set goal, like collecting a crate or killing all enemies
    21 * Mission maps (e.g. TrophyRace)
    21  * Mission maps (e.g. TrophyRace)
    22 * Styles (e.g. Highlander, Balanced Random Weapon)
    22  * Styles (e.g. Highlander, Balanced Random Weapon)
    23 * Campaigns
    23  * Campaigns
    24 
    24 
    25 == The basic structure ==
    25 == The basic structure ==
    26 
    26 
    27 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. The location of the file depends on the script type.
    27 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. The location of the file depends on the script type.
    28 
    28