|
Post by midgear on Feb 26, 2020 0:39:08 GMT
I made some changes to vHealthItem so it would play a sound when you pick it up and figured I would put it here so everyone can use it.
After: public string tagFilter = "Player"; Add:
public AudioClip PlaySound;
private Vector3 pos; After: if (healthController.currentHealth < healthController.maxHealth) {
Add:
//Plays your sound at pick up point
pos= transform.position;
AudioSource.PlayClipAtPoint(PlaySound, pos); Save and drag a sound file to your vHealthItem prefab. Enjoy!
|
|
|
Post by jonniemadeit on Aug 24, 2020 19:52:42 GMT
I haven't tested this just yet, either way, you're amazing! I'll let you how it goes
|
|
|
Post by jonniemadeit on Sept 2, 2020 13:06:52 GMT
I'm a bit unsure how the Vhealthitem works, I've got a prefab that I can pick up that triggers generic animation. but if I add the Vhealthitem script into the object it doesn't work. am I missing something?
|
|