# HG changeset patch # User Wuzzy # Date 1519127516 0 # Node ID dcd14c9ccd2f657dc4798c93466df62771aa1ae2 # Parent 6f312a1ab443be783e57e4dda343dccf89728020 LuaAPI: Add 3 more 0.9.24 functions diff -r 6f312a1ab443 -r dcd14c9ccd2f LuaAPI.wiki --- a/LuaAPI.wiki Mon Feb 19 11:32:19 2018 +0000 +++ b/LuaAPI.wiki Tue Feb 20 11:51:56 2018 +0000 @@ -1166,8 +1166,25 @@ ==== !GetTeamName(teamIdx) (0.9.24) ==== Returns the name of the team with the index `teamIdx`. `teamIdx` is a number between 0 and `TeamsCount-1`. +==== !GetTeamName(teamname) (0.9.24) ==== +Returns the team index (number between 0 and `TeamsCount-1`) of the team with the name `teamName`. + +==== !GetTeamClan(teamname) (0.9.24) ==== +Returns the clan ID of the team with the given `teamName`. + ==== !DismissTeam(teamname) ==== -Removes the team with the given team name from the game. +Vaporizes all the hogs of the team with the given team name in a puff of smoke. + +This function must not be called while it's the team's turn. + +==== `SetTeamLabel(teamname[, label])` (0.9.24)` ==== +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. + +If `label` is `nil`, the label will be removed. + +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. + +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. ==== !GetClanColor(clan) ==== Returns the RGBA color of the chosen clan by its number. The color data type is described in [LuaAPI#Color].