equal
deleted
inserted
replaced
225 This function is called every 20 game ticks, which equals 50 times a second. It reduces Lua overhead for simple monitoring that doesn’t need to happen every single tick. |
225 This function is called every 20 game ticks, which equals 50 times a second. It reduces Lua overhead for simple monitoring that doesn’t need to happen every single tick. |
226 |
226 |
227 === <tt>onNewTurn()</tt> === |
227 === <tt>onNewTurn()</tt> === |
228 This function calls at the start of every turn. You can set `ReadyTimeLeft` here to change the ready time for this turn. (See also: `Ready`) |
228 This function calls at the start of every turn. You can set `ReadyTimeLeft` here to change the ready time for this turn. (See also: `Ready`) |
229 |
229 |
|
230 === <tt>onCaseDrop(gear)</tt> === |
|
231 This function calls between two turns right after the moment at which the game *might* drop a crate according to the game scheme settings. It does not matter if it actually wants to drop a crate. |
|
232 |
|
233 If a crate was dropped, `gear` is the crate gear that was dropped, if no crate was dropped, `gear` is `nil`. |
|
234 |
|
235 This function is useful to add custom crate drops as well. |
|
236 |
230 === <tt>onEndTurn()</tt> (0.9.24) === |
237 === <tt>onEndTurn()</tt> (0.9.24) === |
231 This function calls at the end of every turn. The end of a turn is defined as the point of time after the current hedgehog lost control and all the important gears are either gone or have settled. |
238 This function calls at the end of every turn. The end of a turn is defined as the point of time after the current hedgehog lost control and all the important gears are either gone or have settled. |
232 |
239 |
233 `CurrentHedgehog` holds the gear ID of the hedgehog whose turn just ended. |
240 `CurrentHedgehog` holds the gear ID of the hedgehog whose turn just ended. |
234 |
241 |
1441 |
1448 |
1442 There's a special case: If the AI Survival game modifier is active, the AI kill counter will be replaced by the custom team label if it has been set. If `label` is set to `nil`, the default AI counter is shown again. |
1449 There's a special case: If the AI Survival game modifier is active, the AI kill counter will be replaced by the custom team label if it has been set. If `label` is set to `nil`, the default AI counter is shown again. |
1443 |
1450 |
1444 Use this to display a score, power value or another important team attribute. There's no hard length limit, but please try to keep it as short as possible to avoid visual clutter. |
1451 Use this to display a score, power value or another important team attribute. There's no hard length limit, but please try to keep it as short as possible to avoid visual clutter. |
1445 |
1452 |
|
1453 === <tt>SetTeamPassive(teamname, isPassive)</tt> (1.0.0) === |
|
1454 Mark a team as passive if `isPassive` is `true`. Passive teams do not participate in the game and are treated like frozen teams. When determining the team order, passive teams are completely ignored. |
|
1455 |
1446 ==== <tt>!GetClanColor(clan)</tt> ==== |
1456 ==== <tt>!GetClanColor(clan)</tt> ==== |
1447 Returns the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color]. |
1457 Returns the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color]. |
1448 |
1458 |
1449 ==== <tt>!SetClanColor(clan, color)</tt> ==== |
1459 ==== <tt>!SetClanColor(clan, color)</tt> ==== |
1450 Sets the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color]. The new clan color *must* be different from the color of all clans (you can't use this function to change clan memberships of teams). |
1460 Sets the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color]. The new clan color *must* be different from the color of all clans (you can't use this function to change clan memberships of teams). |