I’m trying to find somewhere in the designer that allows me to specify a period of time where triggering an event would fail.
Specifically, I want to use this in order to stop sounds being triggered in very quick succession, or at the same time.
The problem is that I’m trying to solve a situation similar to the following explanation:
(Note, this is an analogy for the type of behaviour I want to avoid)
- There are 2 types of objects, let’s call them "Ground" and "Pebble"
- Pebbles will get dropped randomly
- Upon impacting with "Ground" the "PebbleHitsGround" sound will play
- Note that due to the nature of the environment the "PebbleHitsGround" sound has to be a sound that has a reasonable length (say, 500ms) – (again, remember this is an analogy, I know pebbles hitting the ground should be a really short sample, but bare with me for the moment).
What I want to avoid is playing 2 "PebbleHitsGround" sounds in quick succession, or at the same time, BUT I don’t want to limit MaxPlaybacks to 1 as the sample tail is reasonably long and I want to be able to play multiple sounds at once.
What I would like is a setting that limits the playback mode of an event to be no sooner than some value – let’s say 80ms.
So, for example:
– PebbleHitsGround event is defined with MaxPlaybacks > 1
– Pebble1 hits the ground
– PebbleHitsGround event is fired
– Pebble2 hits 50ms later
– PebbleHitsGround event should fail because the minimum wait time for the event is set to 80ms
– Pebble3 hits the ground 100ms after Pebble1
– Pebble1’s sound is still playing, but Pebble3 hits after the minimum wait time, and so the event triggered.
Is there anyway to do this?
If not, I request that this functionality should be added.
I know I can add this to code, but that detracts from the "trigger and forget" functionality of our collision system.
Thanks for any help
Currently there isn’t a way to do this. You would have to implement it in your audio management system. You could use an event user property for the timeout value, so it could be edited in Designer, but you would have to write the code to set and check the last play time when the event is triggered.
I have added a request for this feature to our tracker; we will look into it.
- Guest answered 9 years ago
Please login first to submit.