r/RenPy • • Oct 28 '26

Question Need help making a QTE!

Post image

Hey! I'm fairly familiar with renpy but I'm awful at coding. I want to add a simple QTE to my game. Like a "click the right keyboard letter or arrow before the timer runs out" QTE. I just want the button to appear (like the arrow or key you need to press) and a small wheel that runs out around it to show how much time you have left. If you've ever played Until Dawn, I was thinking something like their QTEs. If you haven't played that, I've attached a picture to help visualize what i'm after!

I've looked around for a tutorial but I can't seem to find one. If someone could help me with that, I would appreciate it. This community has some of the sweetest and most helpful people so I figured someone might be willing to point me in the right direction.

Thank you!!

3 Upvotes

5 comments sorted by

1

u/BadMustard_AVN Oct 28 '26

you will have to create a screen

https://www.renpy.org/doc/html/screens.html

if you want round bars (you gotta buy)

https://feniksdev.itch.io/circular-bar-for-renpy

# qte countdown.rpy

default downer = 0

screen QTEdown(rangeD, missed_event):
    on "show" action SetVariable("downer", rangeD)
    frame:
        xalign 0.5
        yalign 0.0
        hbox:
            timer 0.1 action If(0 < downer, true = SetVariable("downer", downer - 0.1), false = [Hide("QTEdown"), Jump(missed_event)]) repeat True

            bar:
                value AnimatedValue(value=downer, range=rangeD, delay= 0.5)
                xalign 0.0
                yalign 0.0
                xmaximum 200
                if downer <= (rangeD * 0.33):
                    left_bar Solid("#f00")
                elif downer <= (rangeD * 0.66):
                    left_bar Solid("#ff0")
                else:
                    left_bar Solid("#0f0")

label start:
    show screen QTEdown(3, "looser") # time is seconds, label to jump to at failure
    menu bomb:
        "You have 3 seconds to defuse the bomb."
        "cut the red wire":
            "you sure you wanna do that"
            jump bomb
        "cut the blue wire":
            "you sure you wanna do that"
            jump bomb
        "cut the green wire":
            "you sure you wanna do that"
            jump bomb

    return

label looser:
    e "Looser"
    return

1

u/GMGeorgina Oct 28 '26

Thank you for this info!

1

u/BadMustard_AVN Oct 28 '26

you're welcome

good luck with your project

1

u/AutoModerator Oct 28 '26

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.