Package function ProjectileData::onCollision(%this, %obj, %col, %fade, %pos, %normal, %velocity). %obj is the projectile and %col is the object collided with, so you should do an if(%col.getClassName() $= "Player") or if(%col.getType() & $Typemasks::PlayerObjectType) check first. Replace ProjectileData with the name of your projectile datablock and make sure you call the parent.