I’ve got a Multi-Track event setup with two Sound Defs.
-The first one is the sound of leaves rustling and it’s looping.
-The second is the sound of one berry drop, but the sound def is randomly generating the sound with random pitch and volume.
I’ve sent the event to "Just Fail".
The problem is, we have an animation that is looping and every time it passes by frame 1, the effect is triggered. There are only 20 frames in the looping animation so it’s being triggered lots. I’m getting the sound triggered many times without the berry drop sound. Also, the leaves sound like they start again. Is there a way to trigger it once and just have the event playing while ignoring the call of the loop animation? I’ve searched the manual and adding a state in code of whether the animation has started or stopped would not be ideal for now. Any thoughts?
- halfasemitone asked 6 years ago
The berry drop is only a few milliseconds. I don’t think the code is telling it to stop either. I also don’t hear any phasing or distorting. No pile up whatsoever. If anything, it just sounds like it’s ignoring the call, then when one call flukes and hits the end of the audio file, it starts it again. It’s hitting the play button 20 times a second basically. It’s doing it’s best to ignore it but it’s not I think. The way I want the event to work is to trigger, let it loop for a while, then stop when the animation stops. Because it sounds like the event is always starting again, I dont’ think the berry sound has time to spawn. Any thoughts on that?
So now, I’ve convinced the programmers to add code for this event to work. Now that it’s in the game, they have it where the event is called once, it starts playing, then they stop the event when the animation changes. Simple. The leaves rustling works, but the berries don’t. I don’t get any berry sound whatsoever. The multitrack event works in designer but not in the game. Any thoughts on that?
[quote="halfasemitone":2tfixsxv]I’m getting the sound triggered many times without the berry drop sound. Also, the leaves sound like they start again. Is there a way to trigger it once and just have the event playing while ignoring the call of the loop animation? I’ve searched the manual and adding a state in code of whether the animation has started or stopped would not be ideal for now. Any thoughts?[/quote:2tfixsxv]
Hmm… Just to be clear, does the berry drop sound play once the first time the event is triggered? Or does it never play at all?
If it plays just the once, then the problem may be the ‘play count’ and ‘spawn time’ properties of the berry drop sound def – the former should be ‘0,’ and the latter should be whatever the length of your animation is in milliseconds.
If the berry drop sound doesn’t even play once, then the issue is either something to do with the circumstances under which that particular sound def is triggered, or due to the ‘just fail’ behaviour not working as you intended it to. Does your event use a parameter with velocity? Does the Berry Drop sound def have a trigger delay?
It sounds like you want the event to play and then wait until the event has finished playing before the event can be triggered again, correct? If so, what’s the ‘Max Playbacks’ of the event set to? I would set it to 1 to prevent multiple instances of this event triggering back to back (i.e. every 20 frames).
Not sure why the berry drop sound isn’t playing, but it would make sense not to hear it in a ‘Steal Oldest’ scenario. But since you’re not using ‘Steal Oldest’, if the event plays as expected in Designer and in the Event Player, and the game code is letting the event play long enough that you should hear it, then I’m not sure what’s wrong. Is the game code by chance stopping and then starting the event each time the animation loops. If ‘Just Fail’ isn’t working and you’ve got ‘Max Playbacks’ set well above 1, then you should hear the sounds piling up/distorting/phasing pretty quickly.
- capybara answered 6 years ago
Please login first to submit.