# HG changeset patch # User Wuzzy # Date 1561152124 -3600 # Node ID 962f362690beed69e7de2ffd49383cc36f7db950 # Parent a604b1f25dad3b8488d8b97bd3a6706351c05ca3 LuaGameplay: Return value of AddTeam / AddMissionTeam diff -r a604b1f25dad -r 962f362690be LuaGameplay.wiki --- 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: `, `. For functions that need the team name as input (lke `DismissTeam`), you must use this returned ``. + ==== 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”. ]] -=== !AddMissionTeam(color) (0.9.25) === +=== !AddMissionTeam(color) (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: `, `. For functions that need the team name as input (lke `DismissTeam`), you must use this returned ``. + Use `AddMissionHog` or `AddHog` afterwards to add hedgehogs for this team. You can mix `AddMissionHog` and `AddHog` as you wish. Example: