LuaAPI.wiki
changeset 1695 6bf2e6deedb0
parent 1694 d3bebda2cdfd
child 1696 90dc2f42db2b
equal deleted inserted replaced
1694:d3bebda2cdfd 1695:6bf2e6deedb0
   500 === <tt>!AddMissionHog(health)</tt> (0.9.25) ===
   500 === <tt>!AddMissionHog(health)</tt> (0.9.25) ===
   501 Add a hedgehog for the current team, using the player-chosen team identity when playing in singleplayer missions. The “current team” is the last team that was added with `AddMissionTeam` or `AddTeam`.
   501 Add a hedgehog for the current team, using the player-chosen team identity when playing in singleplayer missions. The “current team” is the last team that was added with `AddMissionTeam` or `AddTeam`.
   502 
   502 
   503 The name and hat match the player's team definition. The hog is also always player-controlled.
   503 The name and hat match the player's team definition. The hog is also always player-controlled.
   504 
   504 
       
   505 Example:
   505 <code language="lua">-- Add player team with 3 hogs
   506 <code language="lua">-- Add player team with 3 hogs
   506 AddMissionTeam(-1)
   507 AddMissionTeam(-1)
   507 AddMissionHog(100)
   508 AddMissionHog(100)
   508 AddMissionHog(100)
   509 AddMissionHog(100)
   509 AddMissionHog(100)</code>
   510 AddMissionHog(100)</code>
  1409 
  1410 
  1410 <code language="lua">AddTeam("team 1", -1, "Simple", "Tank", "Default", "hedgewars")
  1411 <code language="lua">AddTeam("team 1", -1, "Simple", "Tank", "Default", "hedgewars")
  1411 --[[ Adds a new team with name “team 1”, the first default color (usually red), the grave “Simple”,
  1412 --[[ Adds a new team with name “team 1”, the first default color (usually red), the grave “Simple”,
  1412 the fort “Tank” the voicepack “Default” and the flag “hedgewars”. ]]</code>
  1413 the fort “Tank” the voicepack “Default” and the flag “hedgewars”. ]]</code>
  1413 
  1414 
  1414 === <tt>!AddMissionTeam(color)</tt> (0.9.25) ===
  1415 ==== <tt>!AddMissionTeam(color)</tt> (0.9.25) ===)
  1415 Adds a new team using the player-chosen team identity when playing a singleplayer mission.
  1416 Adds a new team using the player-chosen team identity when playing a singleplayer mission. Does not work in multiplayer.
  1416 Does not work in multiplayer.
  1417 
  1417 
  1418 This function is very similar to `AddTeam`. Team settings like team name and flag will be taken from the player-chosen team.
  1418 This function is very similar to `AddTeam`. Team settings like name or flag do not need to be specified, they will be taken from the player-chosen team.
  1419 You only need to specify the clan color, which has the same meaning as in `AddTeam`.
  1419 You only need to specify the color, which works like in `AddTeam`.
       
  1420 
  1420 
  1421 Use `AddMissionHog` or `AddHog` afterwards to add hedgehogs for this team. You can mix `AddMissionHog` and `AddHog` as you wish.
  1421 Use `AddMissionHog` or `AddHog` afterwards to add hedgehogs for this team. You can mix `AddMissionHog` and `AddHog` as you wish.
  1422 
  1422 
  1423  * `color`: See `AddTeam`.
  1423  * `color`: See `AddTeam`.
  1424 
  1424