Sethorion

Veteran
Veteran
Joined
May 8, 2015
Messages
52
Reaction score
19
First Language
English
Primarily Uses
I don't want to use MV's GUI for inputting a 'script' that 'repeats'. I'm building my game mostly using code, so most of my work will be done in the form of a complex plugin. So in JS, how would I tell a given event to repeat the method "Hello world" every 15 seconds, for instance? Bonus points if I can call start the repeating method with StartIntervalThink( interval ), and use OnIntervalThink() to say what happens when each interval fires. (I understand generally how this works with JS, but I'm only just starting with MV's existing API)

(I'm trying to build a 'plugin' that is actually an intuitive library that teaches newcomers expert coding processes. Will be assisted by some YouTube videos)
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,626
Reaction score
505
First Language
German
Primarily Uses
RMMV
If "Total Game Time Seconds" equal or more than VariableX
do: VariableX set to ("Total Game Time Seconds" + 15)
execute all the fancy code
else
nothing

The Condition would still be checked up to 60 Times per second but the
whole codeblock would only execute every 15 seconds.
Not sure if this helps here.
 

Sethorion

Veteran
Veteran
Joined
May 8, 2015
Messages
52
Reaction score
19
First Language
English
Primarily Uses
Nice! I'll give this a stab and come back with the code once it works.
 

Latest Threads

Latest Posts

Latest Profile Posts

It has been brought to my attention that the name of my main robot protagonist in bio-Synthetica (R3-M1) is a Star Wars character LOL Woops. Always Google search names. The new name of my robot is now K0-R1. :kaophew:
I'm considering making my own battlers from scratch, it seems like a daunting task, but I like the look of it so much...A_Miriam3.png
I picked up running again after a long time and managed to get from 2.25km to 7km in two weeks :3 Time to get rid of those covid kilos!
Have you ever wondered what the lives of the NPC's are like in your hero's story? Come an find out with us as we play, "A Story Beside" by Wayward Prophet :LZSexcite:

Never in my life did I dream that I would be the proud owner of 5 jellyfish.

Forum statistics

Threads
122,092
Messages
1,146,461
Members
160,382
Latest member
Francis187
Top