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.
asked Mar 12 '17 at 06:15 AM in Blueprint Scripting
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
answered Mar 12 '17 at 11:30 AM
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. :(
Here is a screen shot.
Thank you again!
answered Mar 13 '17 at 05:12 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here