[SOLVED] Can keyboard input be timed?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
[SOLVED] Can keyboard input be timed?
Can you set it up so that if you don't type something in on time, something happens?
Last edited by Ivlivs on Mon Oct 07, 2013 4:34 pm, edited 1 time in total.
Jitteh Dawn --- A VN by Ivlivs
- jesusalva
- Regular
- Posts: 88
- Joined: Mon Jul 22, 2013 5:05 pm
- Organization: Software in Public Interest, Inc.
- IRC Nick: jesusalva
- Github: pazkero
- itch: tmw2
- Location: Brazil
- Discord: Jesusalva#4449
- Contact:
Re: Can keyboard input be timed?
Yes.
so, ui.timer() start a timer, the first value is the time to wait (6.0 seconds), the second is what to do.
I placed ui.jumps() , that jump to a label, in that, the label "verybad".
I didn't tested with Keyboard Inputs, only with menus, so I can't say if it works.
Code: Select all
$ ui.timer(6.0, ui.jumps("verybad"))
$ value = renpy.input("INPUT SOMETHING!!!")
"Yeah, you've wrote [value]."
I placed ui.jumps() , that jump to a label, in that, the label "verybad".
I didn't tested with Keyboard Inputs, only with menus, so I can't say if it works.
Jesusaves/Jesusalva
Re: [SOLVED] Can keyboard input be timed?
It worked! Thanks, Jesusalva.
Jitteh Dawn --- A VN by Ivlivs
- jesusalva
- Regular
- Posts: 88
- Joined: Mon Jul 22, 2013 5:05 pm
- Organization: Software in Public Interest, Inc.
- IRC Nick: jesusalva
- Github: pazkero
- itch: tmw2
- Location: Brazil
- Discord: Jesusalva#4449
- Contact:
Re: [SOLVED] Can keyboard input be timed?
You're welcome.
Anything else, just ask.
Anything else, just ask.
Jesusaves/Jesusalva
Re: [SOLVED] Can keyboard input be timed?
...O_O I can see it now! Asura's Wrath: the visual novel!
Well not exactly but I have always wondered if I could add a little action to a standard VN by adding timed choices that result in bad outcomes if you dont react in time rather than just choosing the wrong option. Sort of like Dragon's Lair, but then again I guess that's kinda the original quick time event game anyway.
Well not exactly but I have always wondered if I could add a little action to a standard VN by adding timed choices that result in bad outcomes if you dont react in time rather than just choosing the wrong option. Sort of like Dragon's Lair, but then again I guess that's kinda the original quick time event game anyway.