Blockland Forums > Modification Help
Playing sound from location of projectile impact?
<< < (3/3)
Conan:
uh that doesnt seem right

you should attach the sfx to the projectile explosion, or package yourProjectileDatablock::onCollision and using serverPlay3D(sound, position);
Ctrooper:

--- Quote from: Conan on November 02, 2017, 04:34:49 PM ---uh that doesnt seem right

you should attach the sfx to the projectile explosion, or package yourProjectileDatablock::onCollision and using serverPlay3D(sound, position);

--- End quote ---
I was using serverPlay3D i might just go back to that.

I got it to work.

--- Code: ---function SMAWProjectile::onCollision(%this, %obj, %col, %fade, %position, %normal)
{
   ATExplosionSFX.play(%position);
   Parent::onCollision(%this, %obj, %col, %fade, %position, %normal);
}
--- End code ---

Thanks for the help guys
Navigation
Message Index
Previous page

Go to full version