Limit of time to take decisions

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
Bombermans
Newbie
Posts: 13
Joined: Sun Apr 01, 2007 8:27 am
Location: Spain
Contact:

Limit of time to take decisions

#1 Post by Bombermans »

Is there any way of putting a menu with a limit of time to take the decisions? For example, if a monster appears and you do not react on time, something happens.

Again, sorry for my bad english. I have used a translator. 8)

User avatar
akemicchi
Veteran
Posts: 465
Joined: Mon Dec 31, 2007 11:22 pm
Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
Deviantart: littlebabyshoes
Contact:

Re: Limit of time to take decisions

#2 Post by akemicchi »

Yes. Here:
http://www.renpy.org/wiki/renpy/doc/coo ... imed_menus

The main piece of code here is the ui.timer.

Code: Select all

$ ui.timer(10.0, ui.jumps("menu1_slow"))
The first argument in the ui.timer function is the length of time to wait. It's in seconds. The second argument is the function 'ui.jumps', which is used to determine the label to jump to. When the timer runs out, it will jump to the label supplied by ui.jumps.

ui.jumps("label_here")

User avatar
Bombermans
Newbie
Posts: 13
Joined: Sun Apr 01, 2007 8:27 am
Location: Spain
Contact:

Re: Limit of time to take decisions

#3 Post by Bombermans »

Thank you very much. That's just what I was looking for. :mrgreen:

Post Reply

Who is online

Users browsing this forum: piinkpuddiin, Semrush [Bot]