Access Switch Names [resolved]

Hi guys,

Is it possible to access the name of switches in a plugin?



Resolved.

$dataSystem.switches[1] returns the name of that switch.
Not by default, because originally the names for switches are an editor-only feature to make it easier for the developer.

What you can do is request a plugin that reads the json file of the editor and saves that data elsewhere to make it available in the game.
if you know script
you can make a float variable and import it as plugin
make a .js file
myswitch1 = false;
myswitch2 = false;

and that's it
you can call myswitch anywhere anytime
just to be sure you load these variable before call it in other plugin

and there are plugin about this in japanese

you can call name by
if ($namedSwitches.flag1) $namedSwitches.flag1 = false;
flag1 is the name you make in editor

I had use it
but now I just go with above method

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/access-switch-names-resolved.121358/