Page 1 of 1

screen action: Call(label)

Posted: Thu Dec 29, 2011 7:18 pm
by SinusPi
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..?

Re: screen action: Call(label)

Posted: Thu Dec 29, 2011 9:53 pm
by PyTom
I replied in the other thread.