Page 1 of 1

[SOLVED]Screen moving in, out, then repeat different display

Posted: Wed Jul 22, 2015 7:47 am
by mobychan
Hey everyone^^

Quick question, since I can't figure it out after trying multiple things:

I want to show a screen to move it, stay for 1-2 seconds, then move out again.
This part is no problem, but I sometimes have a second set to display directly after the first one, so I'd like it to move back in and out with the updated display.

My main problem with all of this is, that I don't know how to wait for the first round of moving in/out to complete and then changing some variables and recalling the screen(without getting the "interaction in the middle of an interaction" error because of pausing)


Is this possible at all?
Or does anyone have an idea what I could try?

Re: Screen moving in, out, then repeat with different displa

Posted: Wed Jul 22, 2015 8:33 am
by SinnyROM
I think a combination of tags (http://www.renpy.org/doc/html/screens.h ... -statement) and the timer statement (http://www.renpy.org/doc/html/screens.html#timer) can accomplish this. Give the switching screens the same tag and then show the screen depending on a variable. I haven't tested this but it would look something like this:

Code: Select all

screen one():
    tag switchable
    text "Screen one"
    if time_to_switch:
        text "Screen one will switch soon"
        timer 3.0 action Show("two")

screen two():
    tag switchable
    text "Screen two"

label start:
    $ time_to_switch = False
    show screen one
    "Not time yet"
    $ time_to_switch = True
    "Now it's time"
    return

Re: Screen moving in, out, then repeat with different displa

Posted: Wed Jul 22, 2015 8:49 am
by mobychan
I think with the timer it should work...
trying it out immediately ^^

Thank you very much ^^

Re: Screen moving in, out, then repeat with different displa

Posted: Wed Jul 22, 2015 9:35 am
by orz
Or does anyone have an idea what I could try?
Instead of it necessarily being a screen that you're moving (and thus, using transitions), what about calling a screen that moves multiple pieces via transforms?

Re: Screen moving in, out, then repeat with different displa

Posted: Wed Jul 22, 2015 9:45 am
by mobychan
It's working, thank you very much again, SinnyROM.

@orz: thank you for your suggestion, I'll think about it ^^