Entity:GetHitBoxBone
Description
Gets the bone the hit box is attached to.
Arguments
2 number hboxset
The number of the hit box set. This should be 0 in most cases.
Numbering for these sets start from 0. The total amount of sets can be found with Entity:GetHitBoxSetCount.
Returns
Example
local ply = LocalPlayer()
local numHitBoxSets = ply:GetHitBoxSetCount()
for hboxset=0, numHitBoxSets - 1 do
local numHitBoxes = ply:GetHitBoxCount( hboxset )
for hitbox=0, numHitBoxes - 1 do
local bone = ply:GetHitBoxBone(hitbox, hboxset )
print( "Hit box set " .. hboxset .. ", hitbox " .. hitbox .. " is attached to bone " .. ply:GetBoneName(bone) )
end
end
Output: Hit box set 0, hit box 0 is attached to bone ValveBiped.Bip01_Head1, etc.