Yanntastisch

The yanntastic
Veteran
Joined
May 10, 2020
Messages
51
Reaction score
0
First Language
German
Primarily Uses
RMVXA
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?
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
985
Reaction score
620
First Language
Polish
Primarily Uses
RMMV
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.
 

Yanntastisch

The yanntastic
Veteran
Joined
May 10, 2020
Messages
51
Reaction score
0
First Language
German
Primarily Uses
RMVXA
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.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,425
Reaction score
603
First Language
Italian
Primarily Uses
RMVXA
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.
 
Last edited:

Yanntastisch

The yanntastic
Veteran
Joined
May 10, 2020
Messages
51
Reaction score
0
First Language
German
Primarily Uses
RMVXA
oh thank you. I think I'll go for the first one.
 

Latest Profile Posts

Worked on a cutscene skip domino effect using Maker Systems' script as the basis. Basically if I have a batch of cutscenes in a row on different maps, now when you skip one cutscene it will skip the entire set. No more spamming X to skip a scene every new map.

Oh and it will work regardless of where you do it from in the set. Convenient!
seems absolutely WILD to me now all the hundreds of hours of work I used to do in 2k(3) over a decade ago with a resolution of 320x240. that seems so insanely TINY now, seemed so normal at the time!
Playing Aroma Indosiar theme song.
Aroma is an Indonesian TV show about cooking. :)
Working on a characteeer! (Why is it so hard to color hair?) ;-;
Silly-Sketches.png
Just finished eventing a couple simple puzzles in RMMV, for my very first game "Sample Quest." Just messing around, throwing things together, and calling it a story XD On a non-RM note, got my hair cut today!

Forum statistics

Threads
115,378
Messages
1,089,390
Members
150,075
Latest member
Bridge36000
Top