Works for my taser, but not this. I can't seem to figure out what's wrong with it.
function tranquilizerProjectile::onCollision(%this, %obj, %col, %fade, %pos, %normal)
{
if((%col.getType() & $typeMasks::playerObjectType) && isObject(%col.client))
{
%col.setVelocity(VectorScale(getRandom(0, 0.250) SPC getRandom(0, 0.250) SPC "1", 10));
tumble(%col);
//
if(%col.getClassName() $= "Player" || %col.getClassName() $= "AIPlayer")
{
%col.setWhiteOut(1);
}
}
}
function tranquilizerProjectile::damage(%this, %obj, %col, %fade, %pos, %normal)
{
if(%col.getClassName() $= "Player" || %col.getClassName() $= "AIPlayer")
{
%col.setWhiteOut(1);
}
parent::damage(%this, %obj, %col, %fade, %pos, %normal);
}
D: The tranquilizer tumble & whiteout is still not working.