LuaAPI.wiki
changeset 556 e57188e7bc3b
parent 555 b7dd77a7d356
child 557 7a25067aa32c
equal deleted inserted replaced
555:b7dd77a7d356 556:e57188e7bc3b
   380 If `explode` is `true`, the crate will explode when collected.
   380 If `explode` is `true`, the crate will explode when collected.
   381 If `poison` is `true`, the collector will be poisoned.
   381 If `poison` is `true`, the collector will be poisoned.
   382 
   382 
   383 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> ===
   383 === <tt>!AddHog(hogname, botlevel, health, hat)</tt> ===
   384 Adds a new hedgehog for current team (last created one with the `AddTeam` function), with bot level and specified health, also hat.
   384 Adds a new hedgehog for current team (last created one with the `AddTeam` function), with bot level and specified health, also hat.
   385 `botlevel` ranges from `0` to `5`, where `0` denotes a human player and `1` to `5` denote the skill level of a bot.
   385 `botlevel` ranges from `0` to `5`, where `0` denotes a human player and `1` to `5` denote the skill level of a bot, where `1` is strongest and `5` is the weakest. Note that this is the reverse order of how the bot level is displayed in the game.
   386 
   386 
   387 Notice: This works only for singleplayers training missions for now and will desync multiplayer games.
   387 *Warning*: This works only for singleplayers training missions for now and will desync multiplayer games.
   388 
   388 
   389 Example:
   389 Example:
   390 
   390 
   391 <code language="lua">    local player = AddHog("HH 1", 0, 100, "NoHat") -- botlevel 0 means human player
   391 <code language="lua">    local player = AddHog("HH 1", 0, 100, "NoHat") -- botlevel 0 means human player
   392     SetGearPosition(player, 1500, 1000)</code>
   392     SetGearPosition(player, 1500, 1000)</code>