How to detect and play different sound when the ball hits the door vs floor vs desk?

I have been getting really far with BluePrints and I figured this would be easy. Essentially, I have a ball that has physics and collisions enabled. The other objects have collisions enabled. I would like to have only the ball make a different sound when it hits the door, vs when it hits the floor, or the desk, not any other actor that triggers those collision boxes or hit events.

Can someone please share a simple blueprint layout or video that does this? One moving actor that hits 3 different static actors and makes a different sound when it hits each one.

Ideally I would like the Ball’s blueprint to detect which static mesh it hits and then triggers the appropriate sound accordingly, so then I can copy that blueprint script into other actors who may hit the wall, door, or desk and play different sounds in the future.

I have googled and googled, youtubed and youtubed, and hunted this forum. I feel lost. Thank you.

heyho :slight_smile:

try to work with that here:
maybe u have to adapt it a little bit , but defining tags (i guess case sensitive!)to the actors(objects you roll on , walls doors,grounds) and checking at a component hit would be a simple solution

be careful this doesnot work with bsp brushes i guess^^

i hope i could help a little bit

Erytriel,

First off thank you for taking the time to try and help me. I have copied this piece for piece into my project assigning each to it’s respective part. The only thing I could not find is “OnComponentHit” no matter what I typed I could not find that in my blueprints. My Ball actor is a BluePrint class if that changes anything?

Unfortunately it is not working for me. :frowning:

Here is a screen shot.

Thank you again!

i created a collisionsphere , a little bit bigger than the character so when it hits something ,the whole thing should fire^^

you get access to this “on actor hit” if you click on the collisionsphere/box whatever you could created on the left side of your blueprint where the mesh and capsule component also is.

then click it, and under details scroll to the bottom where all avaivable action are and clik on it (hit, overlap and and and)

A collisionsphere? Like on the ball actor as a component?