Disable a random Switch via Event?

I want to disable a random switch between, for example, 1 and 50 in an event.
Is there a way of doing so or do I need a script for this?
Depends how many switch it will be, I think for 50 you can do it. Set variable (let's call it "randomizer") to random value from 0 to 50, then make a conditional branch, where 1 means switch 1 off, 2 means switch 2 off, etc... Lot of clicking, but that's the only option if you don't want to use scripts or plugins.
well I already had that in mind. So I wanted to know if there's another way. A script would do. But I can't find one.
If you randomize a variable (I am gonna call the id of this variable var_id) you can add a script call like this:
Code:
$game_switches[$game_variables[var_id]] = false

If you wanna have it even shorter you can go for this:
Code:
$game_switched[rand(50) + 1] = false

This last solution, however, does not allow you to keep track of which switch you turned off.
oh thank you. I think I'll go for the first one.

Original thread: https://forums.rpgmakerweb.com/threads/disable-a-random-switch-via-event.129890/