, post:3, topic:114695"]
So, just to be clear, you don’t want to STOP the sound when the player moves off the trigger, correct? You just want to make sure another sound isn’t playing if the first one is still going?
[/QUOTE]
Correct! I’m using the event (as it is at the moment) for a sound cue that will play when the player hits the trigger, and if he runs back onto it, it won’t re-engage an additional time while it’s still playing. (I’m still learning, and want to use this for scripted voice-over and text in the future. I want the player to be able to revisit the same trigger, but I need it to give the ability to not have the same audio play over and over itself.)
, post:3, topic:114695"]
I would start by creating a “IsPlaying” boolean (Default: False). Then, instead of the “begin play” event, you would be using your overlap event. Immediately have a branch to check the value of “IsPlaying”. If it’s true, do nothing. If it’s false, duplicate what is shown on the post to begin playing the audio then set “IsPlaying” to true. Then instead of printing the current percentage to the screen, have a branch to check if the percentage is >= 1. If it’s not, do nothing. If it is, set “IsPlaying” to false as the audio has completed.
[/QUOTE]
That’s it! I had a bunch of tweaking to get it all right, but that works wonders. Here’s the present blueprint I’m working with:
To better help understand it, and for the ‘future generations’ who want to do this, here’s what the blueprint does…
SOUND CUE:
I added a variable, “Playing Or Not” and check for it at the beginning of the trigger. As it has not run before, it’s set to FALSE, and spawns my sound cue which starts playing. It sends it’s notification that it is, in fact, playing, which sets the “Playing Or Not” variable to TRUE. So now, if the player engages the same trigger, it registers as TRUE, and sets a manual delay before resetting the variable to FALSE again, and allowing the sound cue to be replayed. (At this time, I couldn’t determine a better method than to have a manual delay in there, so this is what I’ve got.)
POP-UP NOTIFICATION:
I set the TextRender Actor to invisible, so it did not appear in the scene. Once the trigger is activated (in my blueprint, it’s enabled once the music starts playing - you can set yours as a separate process if you wish) it checks to see if it’s visible, and if it’s not, it toggles the visibility to make the text appear, followed by a delay, and then disappear once the delay runs out. If the text was already visible when the trigger is engaged, it bypasses the visibility toggle (as the text is already visible, it doesn’t need to do it again), runs the delay and then finally, toggles the visibility off again, making the text invisible.
I know there may be a lot of different (aka “better”) ways that I could have done this, but I’m happy with it for now! Of course, if anyone has any ideas on how to improve on this, I’d love to see them.
Thanks again for all of your help!