Working sample of Overlay

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
joost@tiouw.com
Newbie
Posts: 9
Joined: Tue May 02, 2006 4:14 pm
Contact:

Working sample of Overlay

#1 Post by joost@tiouw.com »

I want a simple Overlay that just displays the content of a string. Anyone got a sample of how to do Overlay? Seems the example provided isnt working.

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:

#2 Post by PyTom »

Code: Select all

init:
    python:
        def overlay_func():
            ui.text("This is a string.")
        config.overlay_functions = [ overlay_func ]
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

joost@tiouw.com
Newbie
Posts: 9
Joined: Tue May 02, 2006 4:14 pm
Contact:

#3 Post by joost@tiouw.com »

Thanks a lot! Works great.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot