Hoping someone can help me I am looking for help with sound. I am trying to add a trigger box to a sound cue for jump scare but everything I find online is out of date. UE5 seem to be a lot different set up and was wondering if anyone can help. Basically I want the sound to trigger once the player get close to create a jump scare. I don’t not want the sound to repeat again just that once. plus there will be other action happening to like a character walking by.
This is fairly straightforward to do once so you setup couple stuff:
You’ll need a
- Trigger Blueprint
- A Blueprint Interface.
- Your Trigger Blueprint will be inherited from Actor.
- You’ll need to add a Box Collision Component to the Trigger Blueprint to act as the trigger.
- On Begin Overlap on the box, you can check if it was the player that overlapped and then play sounds and do other actions.
- To easily make other actors react to the trigger, we can use a Blueprint Interface.
- Create a Blueprint Interface called something like TriggerInterface and add a function to it called OnTrigger
- Create an Actor array in your Trigger Blueprint and make it Instance Editable, so we can add actors to it from the level.
- And add this extra code to the end of play sound node
- Full Graph :
- You can now add that Interface to other actors ( Class Settings → Interfaces → Implemented Interfaces ) and Implement the OnTrigger even on them.
- Now, in the level you can place the Trigger Blueprint and scale it fit the area you want.
- Also place the actors that you want to trigger in the level
- In you Trigger Blueprints details, you can add the actors that should trigger when overlapping.
- Result :
This way you can have as many Triggers as you want that triggers one actor or many different actors.
2 Likes