2D Shooter: Powerup Sound Effects

--

Objective: Add sound when the powerups are collected.

For these we’re not going to add an Audiosource component. Instead, we’re going to create a variable in the powerup script for an Audioclip. Make sure all three powerups have the audio clip you want attached to this variable.

Now we’re going to use a handy command that will play this clip at the point where the powerup is collected.

And that’s all that is to it!

--

--

Sabrina Windsor
Sabrina Windsor

Written by Sabrina Windsor

Currently learning to code with the help of GamedevHQ in order to someday my my game ideas come to life!

No responses yet