datablock ProjectileData(pepperSprayPaintProjectile) {
className = "Projectile";
scale = "1 1 1";
Explosion = "pepperSprayPaintExplosion";
hasLight = "0";
lightRadius = "1";
lightColor = "1.000000 1.000000 1.000000 1.000000";
hasWaterLight = "0";
waterLightColor = "1.000000 1.000000 1.000000 1.000000";
isBallistic = "0";
collideWithPlayers = "1";
velInheritFactor = "0";
muzzleVelocity = "20";
restVelocity = "1";
lifetime = "300";
armingDelay = "0";
fadeDelay = "0";
directDamage = 0;
directDamageType = $DamageType::Direct;
radiusDamageType = $DamageType::Radius;
explodeOnDeath = "0";
explodeOnPlayerImpact = "0";
bounceAngle = "0";
minStickVelocity = "0";
bounceElasticity = "0";
bounceFriction = "0";
gravityMod = "0";
};
function pepperSprayPaintProjectile::Damage(%this,%obj,%col,%fade,%pos,%normal)
{
if(%col.getType() & $TypeMasks::PlayerObjectType)
{
%col.setWhiteOut(1);
%col.setDamageFlash(1);
%col.setTransform(%col.getPosition() SPC eulerToMatrix(getRandom(0,360) SPC getRandom(0,360) SPC getRandom(0,360)));
}
}
for some reason, It won't call the pepperSprayPaintProjectile.Damage function when I hit other players in minigames...
This works with other weapons I have made, but not this one.. Why? How can I fix this?