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

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
User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

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

#1 Post 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?
Last edited by mobychan on Mon Jul 27, 2015 1:01 pm, edited 1 time in total.

User avatar
SinnyROM
Regular
Posts: 166
Joined: Mon Jul 08, 2013 12:25 am
Projects: Blue Birth
Organization: Cosmic Static Games
Contact:

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

#2 Post 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

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

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

#3 Post by mobychan »

I think with the timer it should work...
trying it out immediately ^^

Thank you very much ^^

User avatar
orz
Regular
Posts: 126
Joined: Tue Apr 21, 2015 10:19 pm
Contact:

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

#4 Post 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?

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

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

#5 Post by mobychan »

It's working, thank you very much again, SinnyROM.

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

Post Reply

Who is online

Users browsing this forum: Satchel