
Unreal Engine Blueprint – Trigger a sound on and off using a trigger box
This can be used to trigger a sound or music file if your character enters the trigger box.
- Add an ‘Audio’ component in the components section:
- When selected (on the right hand-side details panel) there are many details for it.
- Add the required audio file.
- Remember to turn off auto-activate in the details panel otherwise it may play on the begin play of the level.
- You can also add an attenuation file here if you wish.
- Add a Collision Box:
- Add a ‘Box Collision’ in the components section.
- Resize and position to the required size.
- Static Mesh:
- If you wish you can add a ‘StaticMesh’ component.
- And add a mesh such as a radio or record player.
4. Adding Code into Event Graph:
- In the ‘Event Graph’
- Whilst this Collision Box is selected in the components panel.
- In the details panel on the right hand side.
- Scroll down and select:
- ‘On Component Begin Overlap.’
- Select the Collision box again and select:
- ‘On Component End Overlap.’
- Scroll down and select:
- Next, drag off from the ‘On Component Begin Overlap’ node execution pin and search for Play Audio.
- Drag the audio component, from the components list, on the left into the event graph
- Drag off from the Audio component variable and plug into ‘Target.’ (If its not already connected).
- Drag off from the ‘On Component End Overlap’ node execution pin and search for Stop audio.
- Drag off from the Audio component variable and plug into ‘Target.’ (If it’s not already connected as it may get auto added when adding the play or stop audio nodes – if so it can be deleted as two of these nodes is not needed).
- The blueprint can now be added into the level in the required place.
- All done!
For further overviews on how to create Blueprints in Unreal Engine please see the tutorials and tips section or see the intro and getting started with Blueprints post.
Leave a Comment
You must be logged in to post a comment.
Subscribe to Newsletter
Motion Forge Pictures Blog
Featured Posts and Links
Free Height Maps
Free 3rd Person Animations
Free Store Downloads
Unreal Engine - Free Materials
Latest Posts
1802, 2025
1202, 2025
502, 2025
502, 2025
2901, 2025
Categories
Tags
achieve (2)
ambient (3)
animation (18)
animation and filmmaking (17)
arch viz (5)
background video (3)
blender (24)
blueprint (12)
blueprints (13)
car cinematic (2)
cinema (3)
cinematic (4)
cinematics (10)
davinci-resolve (3)
download (4)
film (2)
free (14)
free download (31)
gaming (2)
ghosts (5)
ghost story (3)
haunting (2)
height map (3)
height maps (3)
history (4)
Info and Insights (36)
landscape (11)
landscape height maps (6)
low poly (4)
materials (3)
maya (3)
meetup (2)
modeling (3)
quick tip (3)
ratio (3)
relax (3)
Resources and info (5)
speed design (3)
sports car (3)
substance painter (6)
terrain (5)
tutorial (2)
unreal engine (39)
unreal engine 5 (3)
video (3)
Hello there! I just wanted to take a minute to say THANK YOU SO MUCH! I’ve spent so many weeks trying to figure out how to do this god damn thing. I literally feel so much relief right now because IT WORKED. So, thank you :).
Glad it helped :)