Game starts with switches on I didn't call.

RHachicho

Veteran
Veteran
Joined
Jan 16, 2016
Messages
273
Reaction score
127
First Language
English
Is there some kind of bug in MV where you can have switches just decide to turn themselves on I have four switches that are starting the game as ON when they really seriously shouldn't I have done searches to make sure they aren't being switched by an event I made and forgot about. They are only controlled in events that require me to action button them. And they are definitely ON at game start .. and shouldn't be. Honestly I feel like rpgmaker is trolling me at this point I already had one instance where the game randomly decided to add 2 to a variable in the middle of coding a long event chain which resulted in me having to go back and re-tweak everything later.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
No.  There is no bug.  It's user error.  I bet you've added plugins and not looked at them to see what switches or variables they use.
 

RHachicho

Veteran
Veteran
Joined
Jan 16, 2016
Messages
273
Reaction score
127
First Language
English
No.  There is no bug.  It's user error.  I bet you've added plugins and not looked at them to see what switches or variables they use.


Ah yes .. this is it. Never had a plugin that used ingame switches or variables before. It was OrangeOverlayXD Thanks for the help. Was tearing my hair out over this since I didn't know that was a thing with plugins.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
This is almost always the reason whenever people say their variables or switches aren't doing what they're meant to be doing.  


There are some steps that you should always do when adding a script or plugin to the game, and a lot of people don't do it because they expect them all to be 'plug-n-play', then wonder why weird things happen.  One of them is to check if the script/plugin is using any switches or variables, and to check if you're using the same switch or variable for something else - if you are, find one you're not using and change the script/plugin to use that one instead.  In either case, name the switch or variable in your list so you don't accidentally use it for something else later.
 

RHachicho

Veteran
Veteran
Joined
Jan 16, 2016
Messages
273
Reaction score
127
First Language
English
Yeah once I understood what was happening it was a simple fix. I guess I assumed that if a plugin's code needed to use a variable or switch it would simply create it's own within program memory rather than use the engine's pool. In fact out of the like 30 plugins I use this is the only one to do it. It just seems strange when other plugins must surely use such memory functions Which is precisely why I didn't suspect a plugin of being the source. I wasn't necessarily saying it was a bug either. Just that I felt like the thing was trolling me XD. Precisely because I am a beginner I spent ages trawling through event code trying to find some place I had made some kind of mistake. So it's a mistake born of inexperience rather than laziness.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,370
Reaction score
7,678
First Language
German
Primarily Uses
RMMV
I guess I assumed that if a plugin's code needed to use a variable or switch it would simply create it's own within program memory rather than use the engine's pool.
If it did that, it couldn't use the control variable command to be controlled by events - the events intended to control the script would then have to use script calls.


If a plugin needs a variable for internal use it will always use its own - it will only use the game_variables for data transfer from the events.


One classic example that caused more problems than any other is Yanfly's message script for Ace: it had the option to resize the show text windows to show more than four lines, or to reduce the size horizontally to make space for other things etc...


Really nice option, and all you had to do was to use two control variable commands to set the size for the next show text windows.


What do you guess how many topics this forum has about "my show text windows are suddenly thin lines only after I complete quest XY..." (which set the preconfigured variable to zero)?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
Using switches and variables makes it easier for you to control aspects of a plugin, and you can change how it behaves during gameplay.  Without doing that, you would have to either use the plugin parameters, which means you couldn't alter it at all, or modify the scripts themselves, which would be a step backwards, as introducing plugins was a way to reduce the requirement for non-scripters to modify scripts.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games? And, if so, would any of you be interested in a short, proof of concept type non-euclidian puzzle game?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top