Fading out MEs just like how you fade BGM and BGS

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
241
Reaction score
15
First Language
Portuguese
Primarily Uses
RMVXA
Good Morning / Day / Afternoon / Evening everyone.

This request is a bit different...!

I was wonderfing if it's techically possible to allow the slow fading of music effects on rpg maker vx ace, just like how you can fade BGM or BGS, can this be done with scripting?

I hope this is the right place for this.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Since music effects are not repeated, is there a reason why you cannot edit the file itself and add a fade to the last few seconds of the said file?
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
241
Reaction score
15
First Language
Portuguese
Primarily Uses
RMVXA
I have an opening sequence which you can skip with a key press in my game which I only want it to play ONCE. So using an ME is a good way. but I am kind of put of by how it fades so quickly and I was wondering if I could do a smoother fade. it's not a deal breaker, but it would be a nice touch.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
You could use Audacity (free), select 'Effect', select 'Fadeout' which will change the rate of fade out for you.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
@Kes unfortunately, if the sequence can be skipped at any time, that should be enough of a reason not to edit the file itself, as it is impossible to know when it should fade.

@Panda_Artist that said, unfortunately the audio module is not exactly something that we are allowed to know, as it is part of one of those hidden modules in the DLL. A workaround would be using a BGM instead of a ME, but with a bit of empty space at the beginning so that you can check the audio player position when it restarts and end it. This would solve both the fact that you only want it to play once, and the fade effect.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
281
Reaction score
106
First Language
English
Primarily Uses
RMXP
:unsure: Really guys? It's in the Help File...
RPG::ME.fade(time)
Starts ME fadeout. time is the length of the fadeout in milliseconds.

# which calls...

Audio.me_fade(time)
Starts ME fadeout. time is the length of the fadeout in milliseconds.
Tried it out and the game still thinks the ME is playing. The BGM won't kick back in until the full ME length has played even if it has already faded out entirely. You'd have to make a call to RPG::ME.stop at some point.

What I did was turn on a switch after calling RPG::ME.fade(1000). A parallel process event will then use a Wait command equal to the fade-out time (in this case 60 frames), then call RPG::ME.stop, and lastly turn the switch back off. Granted, if the player deactivates the window, i.e. changes focus to another window, the parallel process won't run and you may get an undesired effect.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
@KK20 you are completely right. I have to admit that I did not remember that part at all, but it looks that the engine already has a built-in method for that, this makes things much easier. Thank you for pointing it out.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top