diff -r d2f4b5b9b77c -r 6d90d6994e95 LuaAPI.wiki --- a/LuaAPI.wiki Wed Dec 03 04:34:46 2014 +0000 +++ b/LuaAPI.wiki Wed Dec 03 04:47:59 2014 +0000 @@ -356,20 +356,11 @@ If `explode` is `true`, the crate will explode when collected. If `poison` is `true`, the collector will be poisoned. - -=== !AddTeam(teamname, color, grave, fort, voicepack, flag) === - -
Adds a new team. Note that this can only be done in onGameInit(), not at a later time. First argument is the team name followed by color, grave, fort, voicepack and flag settings. -
-Notice: This works only for singleplayer's training missions for now and will desync multiplayer games. Flag setting is dev only. - -Example: - - AddTeam("team 1", 14483456, "Simple", "Island", "Default", "hedgewars") === !AddHog(hogname, botlevel, health, hat) === -
Adds a new hedgehog for current team (last created one), with botlevel and specified health also head. -
+Adds a new hedgehog for current team (last created one with the `AddTeam` function), with bot level and specified health, also hat. +`botlevel` ranges from `0` to `5`, where `0` denotes a human player and `1` to `5` denote the skill level of a bot. + Notice: This works only for singleplayers training missions for now and will desync multiplayer games. Example: @@ -805,7 +796,20 @@
Returns a randomly generated number in the range of 0 to number - 1. This random number uses the game seed, so is synchronised, and thus safe for multiplayer and saved games. Use GetRandom for anything that could impact the engine state. For example, a visual gear can use the Lua random, but adding a regular gear should use GetRandom.
-=== Clans === +=== Clans and teams === +==== !AddTeam(teamname, color, grave, fort, voicepack, flag) ==== + +
Adds a new team. Note that this can only be done in `onGameInit`, not at a later time. First argument is the team name followed by color, grave, fort, voicepack and flag settings. +
+Notice: This works only for singleplayer's training missions for now and will desync multiplayer games. Flag setting is dev only. + +Example: + + AddTeam("team 1", 0xDD0000, "Simple", "Island", "Default", "hedgewars") + +==== !DismissTeam(teamname) ==== +Removes the team with the given team name from the game. + ==== !GetClanColor(clan) ====
Returns the colour of the chosen clan by its number.