Preventing all user interaction during a slideshow

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
AXYPB
Regular
Posts: 95
Joined: Thu Sep 04, 2014 3:04 am
Github: AXYPB
Contact:

Preventing all user interaction during a slideshow

#1 Post by AXYPB »

I am coding the ending for my game by defining an image as an ATL block and calling it at the end of the story. As it contains the end credits, I would like to ensure that nothing can interrupt it, unless it is being played as a replay. I've set the variables _dismiss_pause, _skipping, and _rollback to False and _game_menu_screen to None, but pressing any of the skip keys will still disrupt it, causing a console to appear even if config.developer is set to False. What is the proper way to block interaction while an ATL animation plays?

This is the code for the ending sequence:

Code: Select all

label Ending:
    $ persistent.Ending = True
    # Prevent skipping or rollback of any kind.
    $ _game_menu_screen = None
    $ _dismiss_pause = False
    $ _skipping = False
    $ _rollback = False

    play music "bgm/Ending.ogg"
    show ending

    if not _in_replay:
         $ renpy.pause(delay=133,hard=True)
    else:
         $ renpy.pause(delay=133)
         
    $ _game_menu_screen = "save"
    $ _dismiss_pause = True
    $ _skipping = True
    $ _rollback = True
    return
This code is a sample of my ending ATL:

Code: Select all

    image ending:
        Solid("#FFF") 
        alpha 0.0
        linear 6 alpha 1.0  #Fade in from white in 6 seconds. First displayable is shown immediately.
        "images/end01.png" with Dissolve(6) #Show first card starting with white.
        pause 8             #Show card for 2 seconds. Pause statement combines transition time with hold time.
        "images/end02.png" with Fade(2,0,2,color="#FFF")
        pause 8
        ...

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Preventing all user interaction during a slideshow

#2 Post by PyTom »

Huh, causing a console? What does the console say?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

AXYPB
Regular
Posts: 95
Joined: Thu Sep 04, 2014 3:04 am
Github: AXYPB
Contact:

Re: Preventing all user interaction during a slideshow

#3 Post by AXYPB »

My apologies, but I was mistakenly using an outdated version of the SDK with this project. This does not occur in the latest version.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]