You aren't using the right projectile name for the ::Damage.
The name of the projectile is BolterProjectile.
datablock ProjectileData(BolterProjectile)
{
projectileShapeName = "./BolterBullet.dts";
directDamage = 25;
directDamageType = $DamageType::Bolter;
radiusDamageType = $DamageType::Bolter;
brickExplosionRadius = 1;
brickExplosionImpact = true; //destroy a brick if we hit it directly?
brickExplosionForce = 25;
brickExplosionMaxVolume = 3; //max volume of bricks that we can destroy
brickExplosionMaxVolumeFloating = 4; //max volume of bricks that we can destroy if they aren't connected to the ground
impactImpulse = 400;
verticalImpulse = 400;
explosion = BolterExplosion;
particleEmitter = ""; //bulletTrailEmitter;
muzzleVelocity = 90;
velInheritFactor = 1;
armingDelay = 00;
lifetime = 4000;
fadeDelay = 3500;
bounceElasticity = 0.5;
bounceFriction = 0.20;
isBallistic = true;
gravityMod = 0.2;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
uiName = "Bolter Bullet";
};
Then you use BolterRifleBullet. Just change it to BolterProjectile.
function BolterRiflebullet::Damage(%this, %obj, %col, %fade, %pos, %normal) //Should be BolterProjectile, not BolterRifleBullet
{
if(%col.getClassName() $="Player" || %col.getClassName() $= "AIPlayer") //If they're a player of some kind
{
if(%col.getClassName() $= "AIPlayer")
{
%oldClient = %col.client; //Just in case the bot already had a client
%col.client = BotConnection;
%hitBoxList = getHitbox(%obj, %col, %pos);
%col.client = %oldClient;
}
else
{
%hitBoxList = getHitbox(%obj, %col, %pos);
}
if(strReplace(%hitBoxList, "headskin", "BAM") $= %hitBoxList)
{
parent::Damage(%this, %obj, %col, %fade, %pos, %normal);
}
else
{
%obj.client.centerPrint("\c6Nice Shot!",3);
%obj.client.play2D(rewardSound);
%col.damage(%obj, %pos, (125 * getWord(%obj.getScale(),2)), $DamageType::BolterRiflehead);
}
}
else
{
parent::Damage(%this, %obj, %col, %fade, %pos, %normal);
}
}
Edit:The Add Damage type isn't working because you don't have the CI, Most likely, for it.