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
981
Reaction score
619
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 Threads

Latest Profile Posts

Another comic with Backstage Malak...
If you want to ask him anything, you can ask on my DeviantArt page! I'm not sure if you're allowed to do it here.
Forum tip of the day ...
If you get a temporary suspension for being a jerk to people who are trying to help you, and arguing with mods and admins, don't go making new accounts. Chances are, if you p**s us off enough to suspend you for a week, we're not going to hesitate giving you a permanent ban when you give us a reason.
E_6fAErVkAQILXu.png
I'm so close to releasing my game on steam! :blush::blush::blush:
Us:
"This game is awesome! I wish there are more games like this in the future."
Also us:
"I hate how games stopped being original and start copying other successful games."
Should've done this a few days ago but...
PRI_200136808.jpg
Rest in Peace, Sir Clive Sinclair
1940 - 2021
Entrepreneur, Technologist, Father of the Modern British Computing Industry, and protagonist of Legend of ZUN.

Without you, England's games and tech industry wouldn't be where it is.

Forum statistics

Threads
115,286
Messages
1,088,651
Members
149,913
Latest member
badalias
Top