Switch Control by region ID

Hello guys.


Assuming, I'm in an area marked with Region ID 7, then the Switch x is on.
As soon as I leave Region 7, Switch x will be turned off.


Does anyone have any Idea on how to do this?
Basically you'll need a parallel process using control variable, get location info and conditional branches.


However, there might be better ways depending on what you need the switch for, so can you please tell us what should be caused by changing that switch?
Of course, I'm using Yep_Auto passive states and I want to make a conditional state that applies only, if the user is in a certain region.


So for example, if he is in a forest, then all battlers will have a "Forest" state applied at the start of the turn, which for example increases nature damage.


Since the notetags don't allow conditional passive states by region ID's, I figured I could do something with switches

Original thread: https://forums.rpgmakerweb.com/threads/switch-control-by-region-id.62566/