Talk:Gamemode.ScalePlayerDamage

From GMod Wiki

Jump to: navigation, search

Possible Workaround

I use this in my bullet.Callback:

 
//Scale Damage
	if ( tr.HitGroup == HITGROUP_HEAD ) then
		dmginfo:ScaleDamage( 2 )
	elseif ( tr.HitGroup == HITGROUP_CHEST ) then
		dmginfo:ScaleDamage( 1.1 )
	elseif ( tr.HitGroup == HITGROUP_STOMACH ) then
		dmginfo:ScaleDamage( 1.1 )
	elseif ( tr.HitGroup == HITGROUP_LEFTARM || tr.HitGroup == HITGROUP_RIGHTARM ) then
		dmginfo:ScaleDamage( 0.25 )
	elseif ( tr.HitGroup == HITGROUP_LEFTLEG || tr.HitGroup == HITGROUP_RIGHTLEG ) then
		dmginfo:ScaleDamage( 0.30 )
	elseif ( tr.HitGroup == HITGROUP_GEAR ) then
		dmginfo:ScaleDamage( 0.15 )
	else
	//No Scale
	end
 

It works fairly well for player or npc victims. Morphological 10:39, 18 July 2007 (GMT+1)

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox