random wait times

Oghmios1337

Warper
Member
Joined
Jul 19, 2015
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
is it possible to in an event set it so that there is a random wait before the next past of the event goes off (for example a thunderclap or flash of lightning id there is a storm happening)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,091
Reaction score
7,059
First Language
German
Primarily Uses
RMMV
not in the wait command, but you can have a variable set to random and then count down in a loop with a wait.
 

ImaginaryVillain

Now A YouTube Cool Kid! =D
Veteran
Joined
Jun 22, 2019
Messages
439
Reaction score
1,596
First Language
Absurdism
Primarily Uses
RMMV
JavaScript:
// Replace Max with the maximum number of frames you want to wait.
// Replace Min with the minimum number of frames you want to wait.

var frames = (Math.floor((Math.random() * Max) + Min));
this.wait(frames);
You can put that in a script call in any event to make it wait a random number of frames.
 

Oghmios1337

Warper
Member
Joined
Jul 19, 2015
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
thank you I figured someone on here would be able to answer my query
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Popular old italian singer be like: We will win against Coronavirus! Humanity was capable of destroying even the dinosaurs! *cry laughs*
MarioWidjaya123 wrote on kyonides's profile.


I thought they were dead, but I wanted to be certain. :kaoback:
Always kind of annoys me to see people complain about ads in their phone applications because people are too lazy to turn on airplane mode when using them.

Forum statistics

Threads
98,247
Messages
950,681
Members
129,548
Latest member
The_may
Top