Multiple Sounds from a Character

I’m currently handling sound from my character by attaching his dying sound to the character itself, and then calling that sound from the code if he dies. However, I’d also like him to make a sound when he gets hurt by something. This would be a different sound. Would I attach yet another AudioSource to his object? If so, how do I specifically call that specific object?

I solved this by writing a function:

	void playSound(AudioClip soundToPlay)

Then calling it:


where HealthPickup is defined as follows:

HealthPickupSound = Resources.Load ("Sounds/healthpickup") as AudioClip;

For those unfamiliar with Resources.Load, it’ll load a resource from the Assets/Resources folder.