equal
deleted
inserted
replaced
8 Version 0.9.13 of Hedgewars introduced the ability to use Lua scripts to modify Hedgewars behaviour for different maps without having to recompile the whole game. The till then used triggers (only appeared in training maps) were removed. |
8 Version 0.9.13 of Hedgewars introduced the ability to use Lua scripts to modify Hedgewars behaviour for different maps without having to recompile the whole game. The till then used triggers (only appeared in training maps) were removed. |
9 |
9 |
10 Lua is an easy to learn scripting language that’s implemented using open source libraries. If you’d like to learn more about Lua, have a look at [http://www.lua.org Lua's official homepage]. Even though its easy to learn syntax this wiki page won't explain all basics of using Lua, e.g. declaring variables or using control structures. There are tons of step-by-step tutorials and documentation available on the internet. Just throw “Lua” into your favourite search engine and give it a try. |
10 Lua is an easy to learn scripting language that’s implemented using open source libraries. If you’d like to learn more about Lua, have a look at [http://www.lua.org Lua's official homepage]. Even though its easy to learn syntax this wiki page won't explain all basics of using Lua, e.g. declaring variables or using control structures. There are tons of step-by-step tutorials and documentation available on the internet. Just throw “Lua” into your favourite search engine and give it a try. |
11 |
11 |
12 === About this wiki page === |
12 === About this wiki page === |
13 This page tends to become outdated. For a list of undocumented functions, see [http://hw.ercatec.net/docs/lua_wiki_check.php]. |
13 This page might become outdated. For a list of undocumented functions, see [http://hw.ercatec.net/docs/lua_wiki_check.php]. |
14 |
14 |
15 <wiki:toc max_depth="4" /> |
15 <wiki:toc max_depth="4" /> |
16 |
16 |
17 == Overview == |
17 == Overview == |
18 === How Hedgewars handles Lua scripts === |
18 === How Hedgewars handles Lua scripts === |
1227 ==== <tt>!DismissTeam(teamname)</tt> ==== |
1227 ==== <tt>!DismissTeam(teamname)</tt> ==== |
1228 Vaporizes all the hogs of the team with the given team name in a puff of smoke. |
1228 Vaporizes all the hogs of the team with the given team name in a puff of smoke. |
1229 |
1229 |
1230 This function must not be called while it's the team's turn. |
1230 This function must not be called while it's the team's turn. |
1231 |
1231 |
1232 ==== `SetTeamLabel(teamname[, label])` (0.9.24)` ==== |
1232 ==== `SetTeamLabel(teamname[, label])` (0.9.24) ==== |
1233 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. |
1233 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. |
1234 |
1234 |
1235 If `label` is `nil`, the label will be removed. |
1235 If `label` is `nil`, the label will be removed. |
1236 |
1236 |
1237 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. |
1237 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. |