Trouble with Event Switches

Rapheus

Villager
Member
Joined
Apr 28, 2014
Messages
5
Reaction score
1
First Language
English
Primarily Uses
I usually don't have trouble with using and modifying plug n play scripts, but this one has me pulling my hair out.


I'm trying to use a Battle BGM randomizer script, and I don't understand some of the language.


The script I'm using is here:

#==============================================================================


# Random Battle Themes


# Version: 1.0


# Author: DiamondandPlatinum3


# Date: July 23, 2012


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


# Description:


# This script allows you to play a random battle theme upon starting a


# battle, it can be turned off before a boss battle via switch so that


# the appropriate battle them still plays for them.


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


# Turn this switch on before a boss battle so that the


# music you actually want to play will play.


EVENT_SWITCH_ID = 10
 
The random tracks work fine, but I don't know what this means:


# Turn this switch on before a boss battle so that the


# music you actually want to play will play.


EVENT_SWITCH_ID = 10


I've tried script calls and comments before the Boss Battle, but I can't get this to work. Help?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
This has nothing to do with script calls. You have to use an event command, the control switch command, to activate and deactivate the function.

And the ID of the switch you reserved for using this is the number you place in the line as the switch ID - in default the script would be conditioned on the switch with the number 10.

I suggest you read this tutorial on configuring scripts: How to use a script - RMVX Ace Tutorials - RPG Maker Forums

Pleas LINK to the script you have problems with, do NOT repost it here. I deleted the script from your post (especially as it isn't needed for such a basic problem)
 
Last edited by a moderator:

Rapheus

Villager
Member
Joined
Apr 28, 2014
Messages
5
Reaction score
1
First Language
English
Primarily Uses
Thank you for your quick reply and link.

Let me see if I understand:

So I put the script in my script list, (under Materials and above Main, of course) then create a switch, I'll name it 'Boss BGM', which is switch number 0048.

Next, I need to change the above script so it's EVENT_SWITCH_ID = 48  and in the battle trigger event, before I initiate the Boss Battle, turn on switch 48 and change Battle BGM to the boss' theme.

Then after the battle, I turn off switch 48, correct?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV

Rapheus

Villager
Member
Joined
Apr 28, 2014
Messages
5
Reaction score
1
First Language
English
Primarily Uses
It worked like a charm. Thanks again for your expertise, Andar.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top