vbox actions pause?

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
Exiscoming
Regular
Posts: 132
Joined: Tue Apr 29, 2014 5:37 pm
Contact:

vbox actions pause?

#1 Post by Exiscoming »

I'm adding a textbutton to a screen like this, but would like one of the actions to be a pause:

Code: Select all

screen interact1():
    modal True
    default x = renpy.get_mouse_pos()[0]
    default y = renpy.get_mouse_pos()[1]

    frame:
        pos (x + 10, y + 20)
        has vbox
        textbutton "Poke":
            clicked..........
Now the idea for the clicked command is to set a variable, play a sound, pause and then set a different variables.
I know I could jump to a label that can do all of this, but I was hoping something like this would exist:

Code: Select all

clicked Hide("interact1"), Play("sound", "beep.mp3", True),  SetVariable("isActive", 1), [b]Pause(2.5)[/b], SetVariable("isActive", 0)
As you can see in the code above, after clicking the textbutton, it will:
1. Hide the menu
2. Play a sound
3. Set a variable to 1
4. Pause for 2 and a half seconds <- This is what I need help with. Is this possible somehow?
5. Set the variable back to 0.

Post Reply

Who is online

Users browsing this forum: No registered users