Jomy10

Game/Plugin maker
Veteran
Joined
Dec 4, 2016
Messages
31
Reaction score
12
First Language
Dutch
Primarily Uses
RMMV
Hi, I'm currently playing sound effects (long sound effects) like this:
JavaScript:
let music = { name: "se_name", volume: 100, pitch: 100, pan: 100 };
AudioManager.playSe(se);

However, this happpens with a slight delay and I'd like to get rid of this. Is there a way in which I can load an audio file in advance before playing it?
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
1,173
Reaction score
723
First Language
Javascript
Primarily Uses
RMMZ
Hi, I'm currently playing sound effects (long sound effects) like this:
JavaScript:
let music = { name: "se_name", volume: 100, pitch: 100, pan: 100 };
AudioManager.playSe(se);

However, this happpens with a slight delay and I'd like to get rid of this. Is there a way in which I can load an audio file in advance before playing it?
Might very well possibly be other plugins to do this.. but I took an small attempt at it.
No clue if it will work as you need or not but seems to work for me.

I wrote a small plugin that assigns an ID to a loaded sound.

Script Calls:
AudioManager.loadSe(id, se)
AudioManager.playPreloadedSe(id)

I use a parallel event to load it when starting the map...
1652833282010.png
Then to play:
1652833307534.png

Well let me know how it goes. Again honestly no clue if it will work as you need or not.
 

Attachments

  • CTB_PreloadSE.js
    1.5 KB · Views: 3

Jomy10

Game/Plugin maker
Veteran
Joined
Dec 4, 2016
Messages
31
Reaction score
12
First Language
Dutch
Primarily Uses
RMMV
Works perfectly. I can now chain sounds together without pauses. Thanks a lot for the help!
 

Latest Threads

Latest Posts

Latest Profile Posts

ScreenShot_6_24_2022_9_20_7.png
Here's Mike when you get a preemptive strike in battle. There's another one for when an enemy sneaks up on you too.
Suddenly, games mean nothing. The money spent was worth it to bring souls towards the light of life. May God bless my path forever. I pray that all are shaken for truth and poured out flat on the table of true understanding, knowledge, and wisdom. Bless you.
Finally I bought OMORI...cant wait to get traumatised!!!
Finished making this pretty ambitious forest map. Was wondering what y'all think of it! :kaopride:
1656136876015.png
All this anger everywhere,Who's happy but me?
Seems to be all the people that don't follow Jesus wholeheartedly. My smile might burn you ahhhhhhhhhhh!

Forum statistics

Threads
123,021
Messages
1,153,446
Members
161,363
Latest member
jereDev
Top