Hi there,
I'm using the irrKlang sound engine in my game, and I am having a little problem. Let's say I want to play a sound when a certain event happens, i.e. when a certain location is passed or a certain object is used. If I just call play2D() when the event happens, then every frame, the sound will be played from the beginning again as long as the condition is satisfied, resulting in a constant loop of the sound being played freshly every frame.
So my question is, for anyone else who uses this API: How can I play a sound in irrKlang once and once only in this situation? i.e. only play it the first time the game detects that the condition is satisfied, rather than every time?
Thanks, I hope that was clear!
irrKlang: Playing a sound once?
I've never used that API, but I would guess that the event/trigger is the problem area. If the trigger that the event references has 'properties' of any kind that you can easily modify, I would check that those properties don't have a value allowing infinite triggering. I had a similar issue in UDK that I resolved this way.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement