0
0

Currently when an event hits the max number of playbacks a new event will play and the previous will stop. This is often fine but sometimes a different scheme is useful.

Another scheme causes the more recent instances to be ignored if the event is currently playing. This is for example the behavior of an enemy taunting the player. If the AI triggers the taunt before it should than we don’t want another taunt being played but the current taunt to continue to the end.

Have I overlooked this behavior in designer?

  • You must to post comments
0
0

Yeah, that would indeed help a lot. I guess “steal furthest” means that the new event could fail if it’s actually the furthest. At the moment we more or less just have to set max playbacks to a reasonable high value and then do all the real “max playbacks” management ourselves.

However, we are still missing a way to start the event at some time offset into the event. Especially in the case of a long or looping event that may get stolen and then be reinserted into the scene later. For example the music playing in a bar – it shouldn’t start from the beginning every time the player (re)enters the bar.

  • You must to post comments
0
0

I was thinking in terms of the event API, while the sound definition property seems very static. Basicly, if a (looping) event has been started at some point, then stolen and I want it to continue I would llike to be able to play it from the point where it should have been, and not from the start. Also, for looping events, it would add variation if I started them at some random time offset instead of all over each time.

  • You must to post comments
0
0

I know, but if we had something like Event::setOffset(microseconds) (or an offset argument to event::start) along with the new “max playbacks behaviour”, it would still be possible to do the above mentioned behavior on top of the event api. Currently I can’t see how it’s possible without dropping the event system altogether for that kind of sounds, which would be a shame.

For example, persistent 3D objects in our map can have a (looping) sound attched, which is defined as an event path. Then the event should have max playback behavior defined as “steal furthest” and the object could have an updatesound like this:

[code:231j25em]
if (inrange) {
if (!eventplaying) {
event= getEvent(path)
event.set3DAttributes(..)
event.setOffset(currenttime)
event.start()
}
} else
event.stop()

[/code:231j25em]

Without the time offset this would only work well for very simple, monotonic sounds – not for something like music.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.