screen action: Call(label)

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
SinusPi
Newbie
Posts: 22
Joined: Tue Dec 27, 2011 6:30 pm
Contact:

screen action: Call(label)

#1 Post by SinusPi » Thu Dec 29, 2011 7:18 pm

There was only Jump(label) available, so I permitted myself to add a Call(label) action, too, being a bit of a subroutine fanatic and all.

No big eureka here, obviously. common/00screen.py

Code: Select all

    class Call(Action):
        def __init__(self, label):
            self.label = label
        def __call__(self):
            renpy.call_in_new_context(self.label)
Realizing how simple that was, I cannot help but wonder: what basic principle did I break? Surely a Call couldn't've been just overlooked, so there must've been some reason behind its lack... *looks around for tentaclemonsters being spontaneously conjured*

(Edit) Oooh crap. Apparently this prevents a conversation from being saved. Moving the whole concept to Support.

However, this led me to concluding that screen actions lack a basic "call python code" action, one not being a Call to a label with one python line and a return afterwards. Or am I missing something..?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: screen action: Call(label)

#2 Post by PyTom » Thu Dec 29, 2011 9:53 pm

I replied in the other thread.
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 • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users