Question by
mikkelisaksen88 · Dec 29, 2018 at 09:25 AM ·
scripting problemsoundparticlesystemsfx
Play sound on particle death C#
How do i get my sub emitter to play a sound ?
if (Input.GetKeyDown("space"))
{
Debug.Log("space key was pressed");
source.PlayOneShot(rocketThrust, 1f); // <------ sound works fine.
emitRocket1();
if (!rocket1.IsAlive()) // <--------- sound plays immediately
{
Debug.Log("Test1");
source.PlayOneShot(bang, 1f);
}
}
Comment
Your answer
Follow this Question
Related Questions
Adding a CharacterController makes my player move around the map involuntarily 0 Answers
How do I make this script play a particle sytem from prefab 1 Answer
Disable Light,ParticuleSystem and gameobject from the parent? 0 Answers
How to get the audiosource to work? 1 Answer
How to trigger sound with key and gui element displayed? 0 Answers