NOTE: This is an archive of the old wiki.
Expect content to be outdated and links to be broken.

User Tools


obsolete:lua:lua_cb_shoulddocustomdamage

Lua CB ShouldDoCustomDamage

0@@

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

<lua> function ShouldDoCustomDamage( playerIndex, attackerIndex, weaponIndex, damage )

  1. - special players only take armour damage

if ( playerIndex == specialPlayerIndex ) then

	return true, 0, damage;
else
	return false;
end

end </lua>

obsolete/lua/lua_cb_shoulddocustomdamage.txt ยท Last modified: 2023/09/03 18:43 by 127.0.0.1