--- a/LuaGameplay.wiki Sun Jun 02 14:53:50 2019 +0100
+++ b/LuaGameplay.wiki Fri Jun 21 22:22:04 2019 +0100
@@ -352,13 +352,15 @@
Arguments:
- * `teamname`: The name of the team.
+ * `teamname`: The name of the team (might be force-changed)
* `color`: Team color, usually a number from -9 to -1 (see below)
* `grave`: The name of the team’s grave (equals file name without the suffix)
* `fort`: The name of the team’s fort (equals file name without the suffix and without the letter “L” or “R” before that suffix)
* `voicepack`: The name of the team’s voice pack (equals the directory name)
* `flag`: Optional argument for the name of the team’s flag (equals the file name case-sensitively without the suffix). If set to `nil` or the flag can not be found on the local computer, the flag “hedgewars” is used.
+Since version 1.0.0, the team name might be force-changed in case of a naming collision. Since version 1.0.0, this function returns two values: `<real team name>, <team index>`. For functions that need the team name as input (lke `DismissTeam`), you must use this returned `<real team name>`.
+
==== Clan color ====
Each team must have a color. The color also determines clan membership: Teams with equal color are in the same clan.
@@ -382,12 +384,14 @@
--[[ Adds a new team with name “team 1”, the first default color (usually red), the grave “Simple”,
the fort “Tank” the voicepack “Default” and the flag “hedgewars”. ]]</code>
-=== <tt>!AddMissionTeam(color)</tt> (0.9.25) ===
+=== <tt>!AddMissionTeam(color)</tt> (1.0.0) ===
Adds a new team using the player-chosen team identity when playing a singleplayer mission. Does not work in multiplayer.
This function is very similar to `AddTeam`. Team settings like team name and flag will be taken from the player-chosen team.
You only need to specify the clan color, which has the same meaning as in `AddTeam`.
+This function returns two values: `<real team name>, <team index>`. For functions that need the team name as input (lke `DismissTeam`), you must use this returned `<real team name>`.
+
Use `AddMissionHog` or `AddHog` afterwards to add hedgehogs for this team. You can mix `AddMissionHog` and `AddHog` as you wish.
Example: