Need help with switches...

I understand the concept of switches and my game uses a lot of them and they all work, except for one instance which I am completely baffled by. This might be a bit long but let me try to make it as simple as possible.

My game allows you to choose your class at the start of the game, then very early on you can choose a second class (a second party member), but you are not able to choose the same class you started with. To accomplish this, in my character select screen, when the player chooses "Fighter" for example, a switch called FighterSelect gets turned to ON. If they choose "Scavenger", ScavengerSelect get turns on, and so on...

During the second class select which is via an NPC, a conditional branch checks to see if the switches are on, and if so, will create options for every class except for chosen class at the beginning (when the switch is on). So for instance, it will check If FighterSelect is ON, then show all the classes except for fighter. If ScavengerSelect is ON, show all classes except Scavenger.

The PROBLEM I'm running into is that FighterSelect always seems to be on. I made an early event check to display text when I run over a space in the very beginning, that if FighterSelect is ON, to display some text. It's on even when I choose a different class. When I make that event turn off FighterSelect, then make an event to display text right on the next walkable area if the switch is on, it doesn't display the text which tells me the switch turned off. But when I then go to the NPC with the ScavengerSelect ON (which should display all classes except Scavenger), it doesn't even trigger at all. If I make that event that turns FighterSelect OFF also make ScavengerSelect turn ON, it works fine. So something in the intro isn't properly turning the switches on and off...

The only thing to note is that the class selects are set up during an Autorun event if that matters. I can tell you guys more info if you need it, or am I missing something easy? Appreciate the help....
You probably have a plugin and have not configured it correctly. The first step you should do when you add a plugin is to check what switches and variables it uses, and to give those switches and variables names so you don't accidentally use them for something else. If you are already using them for something else, then you need to make the plugin use other switches and variables, and give those names so you don't accidentally use them for something else.

Look for a plugin that's using the same switch that you've allocated to the fighter class.

Moved to MV Support for now



You'll need to post pictures of the event for us to be able to assist more. If it does turn out to be due to a plug-in we'll move the thread then.
The first script during AutoRun to select Class during Intro
jhsLdku.png




Event Page for choosing Fighter during Intro

4TmUMU7.png




Event Page for choosing Scavenger during Intro

RJGMmT9.png




Event Page for selecting the Ally after choosing starting class (Fighter in this case)

XCcA9G2.png




Event Page for selecting the Ally after choosing starting class (Scavenger in this case)

23kPM0g.png




The conditional branch used to create the Ally choices

850X1mu.png




So when I get to the event with the old man, it always defaults to the FighterSelect being ON even if I choose Scavenger to start. When I force FighterSelect OFF and force ScavengerSelect ON with an event (after the character has been spawned after choosing a class during the intro (for testing purposes)), the ally select works as intended via the NPC. The problem is somehow with my intro script not setting the switches to the correct position but I'm not sure why...
so I renamed FighterSelect to DONOTUSE and made a new FighterSelect switch, and even though when I do an Event Search search for DONOTUSE and I have 0 results, it's still being turned on. I've tried forcing it off at the intro event and that doesn't work.
ok so I'm convinced it's a plugin that's causing it to turn on. I'm just not sure how to see what plugin is using what switch
OK yep it was a plugin. I opened the debug menu and found all the switches that were on that I never called to be on and called them DONOTUSE. I will just not use these switches since I need the plugins I have. What a headache...but at least it's resolved. You can close this thread.
What about switches that you did call to be on, that are also used by plugins?

I'm just not sure how to see what plugin is using what switch
You open up the plugin manager and you look at the plugin parameters one by one. The switches will all be there.

If you want a thread closed, you need to report the first post and let the mods know the issue is resolved. But this issue is not resolved.
@carfo
Shaz already told you that it was a plugin several posts ago, and also told you what to do - instead of the VERY BAD idea of simply naming switches to "do not use".
Those switches are intended to be used - they are to be used by you in order to control what the plugins are doing, and if you do not use them then you cannot control or use the plugins you have added.

You need to go to your plugin manager, then you need to open the plugin properties where the plugins are configured.
That configuration will always list the number of a switch or a variable if it is used by the plugin next to a description that tells you what this switch or variable is used for. And then you change the number to one that is not yet used and give that varaiable or switch a name that tells you what you can do with it.

and again, you broke forum rules - please follow them.
Double-post notice: carfo
sorry, thanks for the help everyone

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-switches.106374/