So im trying to make it so when my weapon spawns a projectile, it will randomly play a sound.
I did:
function G36KProjectile::onProjectileAdd(%this,%obj)
{
serverPlay3D(Whizz @ getRandom(1,2),%obj.getPosition());
parent::onProjectileAdd(%this,%obj);
}
but i wasnt getting any sound, so then i tried this:
function G36KProjectile::onAdd(%this,%obj)
{
serverPlay3D(Whizz @ getRandom(1,2),%obj.getPosition());
parent::onAdd(%this,%obj);
}
Still no sound, is there something im doing wrong? How would i accomplish my goal?