Scripting/Server/Functions/BotDamage
Hurts a bot (armour first). At 0 health it dies and onBotDeath(bot, killer) is called (section 3.9). killer is an optional Player credited with the kill.
Syntax
BotDamage(bot, amount [, killer])Arguments
- any bot
- int amount
- Player killer (optional) –
killeris an optional Player credited with the kill.
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "botdamage" )
{
BotDamage( 0, 0 );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Bots - virtual players (v0.5-beta)
Categories: Server functions | Bots - virtual players (v0.5-beta)