129 |
129 |
130 === <tt>onGameInit()</tt> === |
130 === <tt>onGameInit()</tt> === |
131 This function is called before the game loads its resources. One can modify various game variables here: |
131 This function is called before the game loads its resources. One can modify various game variables here: |
132 * <tt>Seed = 0</tt> - sets the seed of the random number generator |
132 * <tt>Seed = 0</tt> - sets the seed of the random number generator |
133 * <tt>!EnableGameFlags(gfSolidLand, gfArtillery)</tt> - sets the !GameFlags (just 2 of them in this example), see above for the available flags/ |
133 * <tt>!EnableGameFlags(gfSolidLand, gfArtillery)</tt> - sets the !GameFlags (just 2 of them in this example), see above for the available flags/ |
134 * <tt>!TurnTime = 60000</tt> - set the turntime in ms |
134 * <tt>!TurnTime = 60000</tt> - set the turn time in ms |
135 * <tt>!CaseFreq = 0</tt> - frequency of crate drops |
135 * <tt>!CaseFreq = 0</tt> - frequency of crate drops |
136 * <tt>!HealthCaseProb = 35</tt> - chance of receiving a health crate |
136 * <tt>!HealthCaseProb = 35</tt> - chance of receiving a health crate |
137 * <tt>!HealthCaseAmount = 25</tt> - amount of health in a health crate |
137 * <tt>!HealthCaseAmount = 25</tt> - amount of health in a health crate |
138 * <tt>!DamagePercent = 100</tt> - percent of damage to inforce |
138 * <tt>!DamagePercent = 100</tt> - percent of damage to inforce |
139 * <tt>!MinesNum = 0</tt> - number of mines being placed (before 0.9.14 !LandAdds) |
139 * <tt>!MinesNum = 0</tt> - number of mines being placed (before 0.9.14 !LandAdds) |
140 * <tt>!MinesTime = 3</tt> - time for a mine to explode from activated, -1 for random |
140 * <tt>!MinesTime = 3000</tt> - time for a mine to explode from activated (in milliseconds), -1000 for random |
141 * <tt>!MineDudPercent = 0</tt> - chance of mine being a dud |
141 * <tt>!MineDudPercent = 0</tt> - chance of mine being a dud |
142 * <tt>Explosives = 0</tt> - number of explosives being placed |
142 * <tt>Explosives = 0</tt> - number of explosives being placed |
143 * <tt>Delay = 0</tt> - delay between each round |
143 * <tt>Delay = 0</tt> - delay between each round |
144 * <tt>!SuddenDeathTurns = 30</tt> - turns until sudden death begins |
144 * <tt>!SuddenDeathTurns = 30</tt> - turns until sudden death begins |
145 * <tt>!WaterRise = 47</tt> - height of water rise at sudden death in pixels |
145 * <tt>!WaterRise = 47</tt> - height of water rise at sudden death in pixels |
146 * <tt>!HealthDecrease = 5</tt> - amount of health decreased on sudden death |
146 * <tt>!HealthDecrease = 5</tt> - amount of health decreased on sudden death |
147 * <tt>Map = "Bamboo"</tt> - the map being played |
147 * <tt>Map = "Bamboo"</tt> - the map being played |
148 * <tt>Theme = "Bamboo"</tt> - the theme to be used |
148 * <tt>Theme = "Bamboo"</tt> - the theme to be used |
149 * <tt>Ready = 5000</tt> - the ready timer at the start of the round |
149 * <tt>Ready = 5000</tt> - the ready timer at the start of the round (in milliseconds) |
150 * <tt>!MapGen</tt> - type of map generator. One of `mgRandom`, `mgMaze`, `mgPerlin`, `mgDrawn`. |
150 * <tt>!MapGen</tt> - type of map generator. One of `mgRandom`, `mgMaze`, `mgPerlin`, `mgDrawn`. |
151 * <tt>!TemplateFilter</tt> |
151 * <tt>!TemplateFilter</tt> |
152 * <tt>Goals = "Jumping is disabled"</tt> - if you want to add info to the game mode dialog, use "|" to separate lines |
152 * <tt>Goals = "Jumping is disabled"</tt> - if you want to add info to the game mode dialog, use "|" to separate lines |
153 |
153 |
154 If you want to add teams or hogs manually you have to do it here. If you want to draw your own map using `AddPoint` and `FlushPoints`, you have to do this within this function as well. |
154 If you want to add teams or hogs manually you have to do it here. If you want to draw your own map using `AddPoint` and `FlushPoints`, you have to do this within this function as well. |