141 === <tt>onGameInit()</tt> === |
141 === <tt>onGameInit()</tt> === |
142 This function is called before the game loads its resources. One can read and modify various game variables here. These variables will become globally available after `onGameInit` has been invoked, but changing them has only an effect in `onGameInit`. |
142 This function is called before the game loads its resources. One can read and modify various game variables here. These variables will become globally available after `onGameInit` has been invoked, but changing them has only an effect in `onGameInit`. |
143 Most variables are optional, but for missions, `Theme` must be set by the scripter if you want to use a random map, rather than an image map. All other variables do not need to be set by the scripter and have default values. |
143 Most variables are optional, but for missions, `Theme` must be set by the scripter if you want to use a random map, rather than an image map. All other variables do not need to be set by the scripter and have default values. |
144 |
144 |
145 List of game variables: |
145 List of game variables: |
146 || *Variable name* || *Default* || *Description || |
146 || *Identifier* || *Default* || *Description* || |
147 || `Theme` || _depends_ || The theme to be used. When `Map` is set, a default value is used. For missions which don't use an image map, `Theme` *must* be set explicitly || |
147 || `Theme` || _depends_ || The theme to be used. When `Map` is set, a default value is used. For missions which don't use an image map, `Theme` *must* be set explicitly || |
148 || `Map` || `""` || The image map being played or `""` if no image map is used || |
148 || `Map` || `""` || The image map being played or `""` if no image map is used || |
149 || `Seed` || `0` || Seed of the random number generator || |
149 || `Seed` || `0` || Seed of the random number generator || |
150 || `MapGen` || `mgRandom` || Type of map generator. One of `mgRandom`, `mgMaze`, `mgPerlin`, `mgDrawn`. || |
150 || `MapGen` || `mgRandom` || Type of map generator. One of `mgRandom`, `mgMaze`, `mgPerlin`, `mgDrawn`. || |
151 || `TemplateFilter` || `0` || _unknown meaning_ || |
151 || `TemplateFilter` || `0` || _unknown meaning_ || |