LuaOverview.wiki
changeset 2193 d916af89912e
parent 2148 ffb2acf779df
equal deleted inserted replaced
2192:edf132b3d2b8 2193:d916af89912e
    22 
    22 
    23 == Important things to know ==
    23 == Important things to know ==
    24 It is possible to play missions in multiplayer. However this requires all participating players to have the exact same version of the map files, including the `map.lua` script file. If this isn’t the case the game will probably desync and “kick” at least the one player using a different version of the map files. To avoid problems when running prepackaged maps, you should never modify any maps provided with the Hedgewars default package. Instead, create a copy of the existing map and modify this one. Feel free to share your work on the forums.
    24 It is possible to play missions in multiplayer. However this requires all participating players to have the exact same version of the map files, including the `map.lua` script file. If this isn’t the case the game will probably desync and “kick” at least the one player using a different version of the map files. To avoid problems when running prepackaged maps, you should never modify any maps provided with the Hedgewars default package. Instead, create a copy of the existing map and modify this one. Feel free to share your work on the forums.
    25 
    25 
    26 Another thing to note is the current status of our scripting implementation. Similar to the whole game, this is still work in progress and we can’t guarantee that scripts working in this version will run in future revisions of the game as we might extend, change or rename parts of the scripting engine.
    26 Another thing to note is the current status of our scripting implementation. Similar to the whole game, this is still work in progress and we can’t guarantee that scripts working in this version will run in future revisions of the game as we might extend, change or rename parts of the scripting engine.
       
    27 
       
    28 == Scripting rules ==
       
    29 To make sure your script is functional on multiple systems and for online play, some simple but important development rules need to be followed. See [LuaRules].
    27 
    30 
    28 == Global variables/constants ==
    31 == Global variables/constants ==
    29 Global variables are used by the game to interact with the scripts by passing and retrieving their values. While some of the variables are never read by the engine some allow you to modify the engine’s behaviour, e.g. the theme to be used for the current map.
    32 Global variables are used by the game to interact with the scripts by passing and retrieving their values. While some of the variables are never read by the engine some allow you to modify the engine’s behaviour, e.g. the theme to be used for the current map.
    30 
    33 
    31 A list of globals can be found in [LuaGlobals].
    34 A list of globals can be found in [LuaGlobals].