How does switch work when it comes to attack patterns?

I never used the feature before. I understand switch, but not sure how switch technically works when it comes to something such as during combat. Is it a switch like to where it activates whenever somebodies HP is low or MP or etc? Can it only be used outside of combat or during combat?
no - the switch will only be turned if you command it.


That condition has some special uses:


1) you can have a troop of enemies with a different attack pattern based on something that happened outside the combat by using a map event to turn that switch.


2) you can use a troop event to turn that switch, for example to change minion behaviour if the main boss has the troop event triggered


3) a bit more tricky is to change the switches by skill use (needs code in the damage formula), for example if the party uses some specific skills to attack the enemies.


All of these options require you to think out the logic and the code for it yourself, but they do allow changing attack patterns on command.

Original thread: https://forums.rpgmakerweb.com/threads/how-does-switch-work-when-it-comes-to-attack-patterns.61093/