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

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.

Section: Bots - virtual players (v0.5-beta)

Categories: Server functions | Bots - virtual players (v0.5-beta)