Add DismissTeam, move AddTeam to new “Clans and teams” section.
authoralmikes@aol.com
Wed, 03 Dec 2014 04:47:59 +0000
changeset 413 6d90d6994e95
parent 412 d2f4b5b9b77c
child 414 14ec7b5cb560
Add DismissTeam, move AddTeam to new “Clans and teams” section.
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.
 
-
-=== <tt>!AddTeam(teamname, color, grave, fort, voicepack, flag)</tt> ===
-
-<blockquote>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.
-</blockquote>
-Notice: This works only for singleplayer's training missions for now and will desync multiplayer games. Flag setting is dev only.
-
-Example:
-
-<code lang="lua">    AddTeam("team 1", 14483456, "Simple", "Island", "Default", "hedgewars")</code>
 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> ===
 
-<blockquote>Adds a new hedgehog for current team (last created one), with botlevel and specified health also head.
-</blockquote>
+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 @@
 <blockquote>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.
 </blockquote>
 
-=== Clans ===
+=== Clans and teams ===
+==== <tt>!AddTeam(teamname, color, grave, fort, voicepack, flag)</tt> ====
+
+<blockquote>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.
+</blockquote>
+Notice: This works only for singleplayer's training missions for now and will desync multiplayer games. Flag setting is dev only.
+
+Example:
+
+<code lang="lua">    AddTeam("team 1", 0xDD0000, "Simple", "Island", "Default", "hedgewars")</code>
+
+==== <tt>!DismissTeam(teamname)</tt> ====
+Removes the team with the given team name from the game.
+
 ==== <tt>!GetClanColor(clan)</tt> ====
 
 <blockquote>Returns the colour of the chosen clan by its number.