Issues with audioclips

Any time we add audio clips to the game it breaks whatever code I have below it. I would like to be implementing audio clips, especially now that the special abilities have been implemented. I just tried adding in the code from this lecture, and when I do the special abilities do not work correctly. As of now they are draining energy, but not utilizing the particle system, nor doing damage. I had this same issue when we first tried implementing audio to damage and death sounds. When I implemented the audio code it broke my game’s ability to allow the player to die, and restart the scene. I have worked on through the game without audio, simply commenting out any code relating to audio, but I would very much like to put it in the game.

During the damage/death sound video I was not logging any errors, however, now I’m getting an “IndexOutOfRangeException: Array index is out of range.” error.

Any ideas or opinions on a fix?

Privacy & Terms