A Problem with the ui.timer (Timed Menus)

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:

A Problem with the ui.timer (Timed Menus)

#1 Post by Bombermans »

Well...I just copied the second script on http://www.renpy.org/wiki/renpy/doc/coo ... imed_menus and it just don't work. I'm using NVL Mode.

Code: Select all

    $ ui.timer(10.0, ui.jumps("menu2_v2"))
    menu:
        "Choice 1 fast":
            hide countdown2
            e "You chosed 'Choice 1' fast"
            jump menu2_end
        "Choice 2 fast":
            hide countdown2
            e "You chosed 'Choice 2' fast"
            jump menu2_end

label menu2_v2:
    $ ui.timer(10.0, ui.jumps("menu2_slow"))
    hide countdown2
    show countdown at Position (xalign = 0.5, yalign = 0.1)
    menu:
        "Choice 1 slow":
            hide countdown
            e "You chosed 'Choice 1', but was slow"
            jump menu2_end
        "Choice 2":
            hide countdown
            e "You chosed 'Choice 2', but was slow"
            jump menu2_end

label menu2_slow:
    hide countdown
    e "You was really slow and didn't choose anything."

label menu2_end:
    e "Anyway, let's do something else."
    
    
    nvl clear
    return
The game runs, but no matter how much time I wait, it does not change. >.<

Again, sorry for my bad english. I didn't use a translator this time, so if there is any problem, i can rewrite the problem o.oU

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: A Problem with the ui.timer (Timed Menus)

#2 Post by JQuartz »

I used the code you provided and it works for me. What version of renpy are you using (I'm using Renpy 6.6.1). I waited for 10 long seconds though. Reduce the value if you want the timer to end faster.

Code: Select all

$ ui.timer(1.0 , ui.jumps("menu2_v2"))
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

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

Re: A Problem with the ui.timer (Timed Menus)

#3 Post by Bombermans »

I'm using 6.6.1 too. Did you use the nvl menu? If i don't use the

Code: Select all

 $ menu = nvl_menu 
the script works. In NVL mode it doesn't work... Is there any form to fix that?

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: A Problem with the ui.timer (Timed Menus)

#4 Post by JQuartz »

Sorry about that, I don't use NVL so I didn't know that. If you're really desperate, maybe you could use a regular menu but disguise it as a nvl menu. But it's a lot of work though.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], decocloud, Google [Bot]