Is there a way to turn off a .js in game?

Its me again, plaguing the forums!


So I have implemented a script (YEP-RegionEvents) which plays custom sounds when you walk over certain terrains, some people may find this a bit annoying, I was wondering if there is a way to turn off a javascript through an event?


So I can give people an option to toggle this off and on.
Unless the scripter implemented that option, then no.
you cannot turn on or off a js while the game is running - that would be equivalent to changing a car's tire while driving at 60mph.


But if the scripter implemented a script call or plugin command for that, you can turn off a plugin's function internally without stopping the plugin itself.


That however depends on the plugin and is not generally possible.
Does the script also allow you to associate a common event with a region id?  If so, use that instead, have a switch that's on or off depending on whether the player wants to hear the sounds, and then do a conditional branch in the common event - if the switch is on (player wants to hear the sounds), play the SE.
Does the script also allow you to associate a common event with a region id?  If so, use that instead, have a switch that's on or off depending on whether the player wants to hear the sounds, and then do a conditional branch in the common event - if the switch is on (player wants to hear the sounds), play the SE.

yes it refers to common events, awesome idea!


I will put this in place now, thanks for that 🙂

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-turn-off-a-js-in-game.63718/