Lua CB ShouldDoCustomDamage

From GoldenEye: Source Wiki

Jump to: navigation, search
bool,float,float ShouldDoCustomDamage( int playerIndex, int attackerIndex, int weaponIndex, float damage )

end

Description

This asks weather a player should use the default damage model or let the gameplay overide the damage values. Return true and the health Damage and armour damage values to skip the normal damage model and false to not.

Version

Beta 3.1

Example

 
function ShouldDoCustomDamage( playerIndex, attackerIndex, weaponIndex, damage )
 
	-- special players only take armour damage
	if ( playerIndex == specialPlayerIndex ) then
		return true, 0, damage;
	else
		return false;
	end
end
 
Personal tools