equal
deleted
inserted
replaced
360 * `grave`: The name of the team’s grave (equals file name without the suffix) |
360 * `grave`: The name of the team’s grave (equals file name without the suffix) |
361 * `fort`: The name of the team’s fort (equals file name without the suffix and without the letter “L” or “R” before that suffix) |
361 * `fort`: The name of the team’s fort (equals file name without the suffix and without the letter “L” or “R” before that suffix) |
362 * `voicepack`: The name of the team’s voice pack (equals the directory name) |
362 * `voicepack`: The name of the team’s voice pack (equals the directory name) |
363 * `flag`: Optional argument for the name of the team’s flag (equals file name without the suffix). If set to `nil`, the flag “hedgewars” is used. |
363 * `flag`: Optional argument for the name of the team’s flag (equals file name without the suffix). If set to `nil`, the flag “hedgewars” is used. |
364 |
364 |
365 === Clan color === |
365 ==== Clan color ==== |
366 Each team must have a color. The color also determines clan membership: Teams with equal color are in the same clan. |
366 Each team must have a color. The color also determines clan membership: Teams with equal color are in the same clan. |
367 |
367 |
368 The team color is specified as a number from -9 to -1. This will select one of the 9 possible team colors as specified in the player's settings. As the actual colors are set by the player, you can't predict them, but you can usually trust these defaults: |
368 The team color is specified as a number from -9 to -1. This will select one of the 9 possible team colors as specified in the player's settings. As the actual colors are set by the player, you can't predict them, but you can usually trust these defaults: |
369 |
369 |
370 * `-1`: red |
370 * `-1`: red |
377 * `-8`: brown |
377 * `-8`: brown |
378 * `-9`: yellow |
378 * `-9`: yellow |
379 |
379 |
380 An older (and now discouraged) method of specifying the color is by hardcoding it as an RGB color (i.e. `0xDD0000`). This practice is now strongly discouraged because it will ignore the player-chosen color (which is *bad* for players with color blindness) and in 99% of cases you don't need it anyway. It should be only used for testing and debugging. |
380 An older (and now discouraged) method of specifying the color is by hardcoding it as an RGB color (i.e. `0xDD0000`). This practice is now strongly discouraged because it will ignore the player-chosen color (which is *bad* for players with color blindness) and in 99% of cases you don't need it anyway. It should be only used for testing and debugging. |
381 |
381 |
382 === Example === |
382 ==== Example ==== |
383 |
383 |
384 <code language="lua">AddTeam("team 1", -1, "Simple", "Tank", "Default", "hedgewars") |
384 <code language="lua">AddTeam("team 1", -1, "Simple", "Tank", "Default", "hedgewars") |
385 --[[ Adds a new team with name “team 1”, the first default color (usually red), the grave “Simple”, |
385 --[[ Adds a new team with name “team 1”, the first default color (usually red), the grave “Simple”, |
386 the fort “Tank” the voicepack “Default” and the flag “hedgewars”. ]]</code> |
386 the fort “Tank” the voicepack “Default” and the flag “hedgewars”. ]]</code> |
387 |
387 |