GamoupIndustries

Villager
Member
Joined
May 25, 2021
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I'm using VX Ace and when I run the following script:
Ruby:
if (AudioManager._currentBgm.name != "Dungeon4")
    Audio.bgm.play("Dungeon4");
It shows an error.
So how do I fix the script?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,747
Reaction score
2,847
First Language
English
Primarily Uses
RMMZ
What's the error?

Wait, AudioManager doesn't exist in VX Ace. The module is Sound, but I'm not sure it can have its currently-playing BGM checked like that. Let me have a look.

Edit: Got it.

if (RPG::BGM.last.name != "Dungeon4")
 
Last edited:

GamoupIndustries

Villager
Member
Joined
May 25, 2021
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMVXA
But how do I change the volume and pitch?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,667
Reaction score
8,486
First Language
German
Primarily Uses
RMMV
nothing in your original post said anything about volume or pitch.

I suggest you give us a full description of what you want to do (instead of questions about tiny steps of how you want to do the unknownwhat), and then we can point you to how it is best done - scripts are not always the best solution for example.
 

GamoupIndustries

Villager
Member
Joined
May 25, 2021
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Conditional Branch: If RPG::BGM.last.name != "Field3"
Conditional Branch: If Ship is Driven
Play BGM: "Ship", 105, 100
Else
Play BGM: "Field3", 105, 100
Branch End
Branch End
 

Latest Threads

Latest Profile Posts

I played Deltarune chapter 2 today! It was great. No spoilers, but I hope one day I can design a world as interesting as Toby Fox and team.
Holy cow, I have made Row Formation work again with OTB!

Now, my devious machinations can finally be born...
finished the second chapter of deltarune today, I gotta say that the 3 years wait was worth it lol

Forum statistics

Threads
115,151
Messages
1,087,673
Members
149,683
Latest member
jdavi
Top