Notify screen question : how to notify more than once

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
User avatar
Posts: 14
Joined: Wed Aug 19, 2009 9:52 am
Location: Rennes [France]

Notify screen question : how to notify more than once

#1 Post by Doogy » Mon Dec 11, 2017 9:01 am

I am searching for a way to display more than one notify screen at the same time, like a stack of notify.
Does anyone have an idea how to do that ?
Sorry for my english, i am french.

User avatar
Ren'Py Creator
Posts: 15269
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

Re: Notify screen question : how to notify more than once

#2 Post by PyTom » Fri Dec 15, 2017 2:07 am

Sorry, but that's not really a function of the notify screen. It's mostly meant for Ren'Py, showing things like fact that a screenshot is created, one at a time.

If you want to change the behavior, you'll have to make your own screen.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama •

User avatar
Eileen-Class Veteran
Posts: 1337
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: xavimat
Location: Italy

Re: Notify screen question : how to notify more than once

#3 Post by xavimat » Sat Dec 16, 2017 7:06 am

Give this a try:

Code: Select all

default notices = []

label start:
    scene bg room
    show eileen happy
    $ notices.append("Hi! I'm a message!")
    $ notices.append("I'm a message too!")
    $ notices.append("Me too! Me too!")
    $ notices.append("Hey! This is kind of crowded!")
    $ notices.append("Give way! I'm an important message!")
    $ notify_me("Hey, don't push! We were here before!")
    "You've created a new Ren'Py game."
    $ notify_me("Phew... finally alone...")
    "Once you add a story, pictures, and music, you can release it to the world!"

init python:

    def notify_me(m=""):
        global notices
        if m:
        if notices:
            renpy.show_screen('notify_plus', notices=notices)
            notices = []

screen notify_plus(notices):

    zorder 100
    style_prefix "notify"

    for dd, i in enumerate(notices):
        frame at notify_plus_appear(dd*3.5):
            text i

    timer 4.25+(dd*3.5) action Hide('notify_plus')

transform notify_plus_appear(dd=0):
    on show:
        yoffset dd*7
        alpha 0 xanchor 1.0 xpos 0.0
        pause dd
        linear .25 alpha 1.0 xalign 0.0
        pause 3.25
        linear .5 alpha 0.0
Note that it doesn't adapts to new notices incoming in the middle of the stack, a new "notify_me()" function will overwrite the remaining stack and present the new one (as the current renpy.notify() does).
The stack is created with $ notices.append("Message"), but it's only shown when the function $notify_me("Message") is called. It passes the stack to the screen and empties it for new messages.
Cops&Robbers A two-player experiment
Fear&Love Why can’t we simply express our feelings? Why am I afraid to say ‘I love you’?
unknown [Sci-Fi - mystery - computer]
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: No registered users