LuaAPI.wiki
changeset 1217 dcd14c9ccd2f
parent 1216 6f312a1ab443
child 1218 344aa78491f6
equal deleted inserted replaced
1216:6f312a1ab443 1217:dcd14c9ccd2f
  1164 the fort “Tank” the voicepack “Default” and the flag “hedgewars”. ]]</code>
  1164 the fort “Tank” the voicepack “Default” and the flag “hedgewars”. ]]</code>
  1165 
  1165 
  1166 ==== <tt>!GetTeamName(teamIdx)</tt> (0.9.24) ====
  1166 ==== <tt>!GetTeamName(teamIdx)</tt> (0.9.24) ====
  1167 Returns the name of the team with the index `teamIdx`. `teamIdx` is a number between 0 and `TeamsCount-1`.
  1167 Returns the name of the team with the index `teamIdx`. `teamIdx` is a number between 0 and `TeamsCount-1`.
  1168 
  1168 
       
  1169 ==== <tt>!GetTeamName(teamname)</tt> (0.9.24) ====
       
  1170 Returns the team index (number between 0 and `TeamsCount-1`) of the team with the name `teamName`.
       
  1171 
       
  1172 ==== <tt>!GetTeamClan(teamname)</tt> (0.9.24) ====
       
  1173 Returns the clan ID of the team with the given `teamName`.
       
  1174 
  1169 ==== <tt>!DismissTeam(teamname)</tt> ====
  1175 ==== <tt>!DismissTeam(teamname)</tt> ====
  1170 Removes the team with the given team name from the game.
  1176 Vaporizes all the hogs of the team with the given team name in a puff of smoke.
       
  1177 
       
  1178 This function must not be called while it's the team's turn.
       
  1179 
       
  1180 ==== `SetTeamLabel(teamname[, label])` (0.9.24)` ====
       
  1181 Set or remove a label for the team with the given team name. The label is a string and will be displayed next to the team's health bar.
       
  1182 
       
  1183 If `label` is `nil`, the label will be removed.
       
  1184 
       
  1185 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.
       
  1186 
       
  1187 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.
  1171 
  1188 
  1172 ==== <tt>!GetClanColor(clan)</tt> ====
  1189 ==== <tt>!GetClanColor(clan)</tt> ====
  1173 Returns the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color].
  1190 Returns the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color].
  1174 
  1191 
  1175 ==== <tt>!SetClanColor(clan, color)</tt> ====
  1192 ==== <tt>!SetClanColor(clan, color)</tt> ====