- Joined
- Feb 6, 2023
- Messages
- 2
- Reaction score
- 1
- First Language
- Portuguese
- Primarily Uses
- RMMV
I'm making a game and i made a mechanic with a long SE that plays everytime the mechanic starts, the events have to run on parallel because the player have to move and find another event to reset the mechanic and run everything again. The mechanic is working well but the only issue is that the SE is not stopping when it has to stop. I tried everything even scripts but nothing worked, i even searched for help on discord and a girl told me to come here and post about because she couldn't know how to fix, she told me to mention that this function:
AudioManager.playSe = function(se) {
if (se.name) {
this._seBuffers = this._seBuffers.filter(function(audio) {
return audio.isPlaying();
});
var buffer = this.createBuffer('se', se.name);
this.updateSeParameters(buffer, se);
buffer.play(false);
this._seBuffers.push(buffer);
}
};
"In particularly the "filter" part is responsible of the fact that multiple SE might overlap each other and therefore erased SE are not stopped when asked to. Why ? I don't know, but it happens even with fresh and new projects."
If someone know to fix i will be very thankful because i stopped working on my project because of that...
AudioManager.playSe = function(se) {
if (se.name) {
this._seBuffers = this._seBuffers.filter(function(audio) {
return audio.isPlaying();
});
var buffer = this.createBuffer('se', se.name);
this.updateSeParameters(buffer, se);
buffer.play(false);
this._seBuffers.push(buffer);
}
};
"In particularly the "filter" part is responsible of the fact that multiple SE might overlap each other and therefore erased SE are not stopped when asked to. Why ? I don't know, but it happens even with fresh and new projects."
If someone know to fix i will be very thankful because i stopped working on my project because of that...