Ok, so i was thinking of making some weapons that would have hitdetection, only problem is, I dont know how to do it, i know there are ways to do it with headshots, but I would like to know how you would go about doing it for other parts of the body aswell, and is:
if(isPackage(hitboxes) == true)
return; // Don't need duplicates.
package hitboxes
{
function getHitbox(%obj, %col, %pos)
{
$hitbox = true;
$hitboxList = "";
paintProjectile::onCollision("", %obj, %col, "", %pos, "");
cancel(%col.tempColorSchedule);
$hitbox = "";
%hitboxList = $hitboxList;
$hitboxList = "";
return %hitboxList;
}
function shapeBase::setNodeColor(%obj, %node, %color)
{
if($hitbox == true)
{
if($hitboxList $= "")
$hitboxList = %node;
else
$hitboxList = $hitboxList SPC %node;
return;
}
parent::setNodeColor(%obj, %node, %color);
}
};
activatePackage(hitboxes);
what I should be looking at?(I ripped it out of gcats firearms...)
For some reason I cant make heads nor tails of this, and it frustrates me.