LuaGuide.wiki
changeset 897 c3ce54152c05
parent 896 ff2bb096e079
child 898 159bbbd0ab0a
equal deleted inserted replaced
896:ff2bb096e079 897:c3ce54152c05
    11 
    11 
    12 == The basic structure ==
    12 == The basic structure ==
    13 
    13 
    14 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.
    14 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.
    15 
    15 
    16 * 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.
    16    * 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.
    17 * If you want to make a training mission then you create a new `.lua` file under `Data/Missions/Training` folder.
    17    * If you want to make a training mission then you create a new `.lua` file under `Data/Missions/Training` folder.
    18 * Campaign missions go into `Data/Missions/Campaign/<CAMPAIGN NAME>`.
    18    * Campaign missions go into `Data/Missions/Campaign/<CAMPAIGN NAME>`.
    19 * If you want to make a custom game style like Highlander, create a new `.lua` file in `Data/Scripts/Multiplayer`.
    19    * If you want to make a custom game style like Highlander, create a new `.lua` file in `Data/Scripts/Multiplayer`.
    20 
    20 
    21 To get started, a `.lua` file should generally be structured like this:
    21 To get started, a `.lua` file should generally be structured like this:
    22 {{{
    22 {{{
    23 function onGameInit()
    23 function onGameInit()
    24 end
    24 end