How to have a switch control the option to dash?

Hi!
I´ve been using RMMZ for 1½ years now and learned a lot, but now I´m afraid I have to trouble one of you.

I am fully aware that you can disable the option to dash in the map properties. I am making a game with real time battle system and I´d much rather have it so that once a map is clear of monsters, it would be possible to dash again. In other words: I don´t want the player to be able to dash when it is in "battle mode".
If nothing else works, I could always make a clone of a battle map that I transfer the player into if all the enemies are beaten, but it´s a lot of extra work just because of that dashing option.

All I need is a piece of code or something that checks whether a certain switch is off/on which gives the option to dash. Maybe as a common event?

I noticed this thread that has similiar request:
But I didn´t understand all of it (and it´s different engine, maybe it matters?)

Any help is greatly appreciated. 🙂
Wow, I feel like a true dummie:
Since I´m using Visustella plugins, all I needed to do was just use the plugin command:
Dash enable / disable.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-have-a-switch-control-the-option-to-dash.153267/