CTakeDamageInfo.SetDamagePosition
From GMod Wiki
Function | |
Syntax |
CTakeDamageInfo:SetDamagePosition( Vector position ) Where is this used? |
Description: | |
Masks/Sets the position of where the Entity was damaged. | |
Returns: | Nil |
Part of Library: | CTakeDamageInfo |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=CTakeDamageInfo.SetDamagePosition]CTakeDamageInfo.SetDamagePosition [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Description | Mask the position to appear a bit higher. |
---|---|
Used on | |
Code | local function EntityDamaged(ent, inflictor, attacker, dmginfo) dmginfo:SetDamagePosition(dmginfo:GetReportedPosition() + Vector(0, 0, 32)) end hook.Add("EntityTakeDamage", "DamagePositionMask", EntityDamaged) |
Output | CTakeDamageInfo.GetReportedPosition will now think it's 32 units higher up. |