Input number with a timelimit

Hello,

I am a Math-teacher and want to make a game for my class.

I myself worked with the RPGMaker when I was in school, so i am familiar with the programm.

Although scripting within the RPGmaker is new for me.

So my problem,...

I want to implement a Timeattack-mode where you have to answer 10 Summation questions within a timelimit.

The player has to give the right answer through Input Number and if he doesn't do it after 10 seconds i want the event to restart.

After 10 times(Questions) the event ends and stores the number of right answers in a variable.

I got the questions right and I tried the timelimit with a second event set on parallelprocess, but i can't figure out how i can affect(restart) the event with the math-question, at the moment the player makes the input.

I hope i could describe my problem.

I think i need to script this part someway, but i have no idea how.

Maybe it doesn't need scripting, ideas? Can anybody please help me with this?

Thanks

Greetings Lukas
Hi, me again.

I tried it myself and wanted to give an update about my findings and maybe to be more precise about the script.

I looked at the inbuild script from the rpg maker about number input and figured...

Can't i just adapt it a little that it works my way?

The script calls an Input number Box. On Enter or after 10 Seconds the Box is closed and the input is stored in a variable.

Edit:

I will post my horrible first tries, tomorrow after i tried a little bit more, before I embarrass myself totally. 😉

Just separating the number input in a script is my problem. :/

class Game_Interpreter
   def ni_t (v,d,t)     # v... Variable ID, d... Digits, t... Time (10 sec)

...
   end
end

2nd Edit:

So,... after my failed attempts to write a script that does what i want,

I focused on the essence of my needs for my project to work...

The closing of the input number window.

After searching for it I stumbled over this script you may need for yourself someday. 🙂

Automatically close messages after set amount of time, works for input number too.

http://www.rpgrevolution.com/forums/index.php?showtopic=36633

lg Lukas
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/input-number-with-a-timelimit.24409/