Page 1 of 1

Display Text while renpy.pause() [SOLVED]

Posted: Mon Oct 16, 2017 9:46 am
by Mangescom
Hey there

This has possibly already been asked but I couldn't find anything.
$renpy.pause() generates an empty textbox.

Code: Select all

x"ABC DEF"
$renpy.pause(5)
#results in Textbox displaying ABC DEF and a second empty textbox during the pause...
Can I have text displayed in there?

Thanks

Re: Display Text while renpy.pause()

Posted: Mon Oct 16, 2017 11:05 am
by Divona
Not really sure what context you're using this for, but here is one way to do it using Text Tag:

Code: Select all

x "ABC DEF{w=5.0}"

Re: Display Text while renpy.pause()

Posted: Tue Oct 17, 2017 4:22 am
by Mangescom
Thank you very much. This was what I was looking for (almost).
I use it for kind of a tutorial where the user can only get out by using the quick menu.

Is there a way to make this unskippable? Like renpy.pause(999, hard=True)?

MY Idea:

Code: Select all

while True:
        "{i}You now have the option to move, talk and look around{/i} {w=9999, hard = True}"
So it will generate a infinite loop, but only regenerate the same message every 9999 or whatever seconds, so the user can still go back (otherwise there would be like a million times the same message) if that maks sense...

As mentioned the idea is that the user can only leave this screen by using "move" "look around" or "talk" (part of the quick menu). The right way to do this would probably be to create a own menu but I want this to be part of to quick menu, which will then be styled to be part of the textbox. (I know, it's complicated, but I hope you'll get what I mean)

Re: Display Text while renpy.pause()

Posted: Tue Oct 17, 2017 6:58 am
by Divona
I have no idea of the other way to do it, but from the description, it sounds like a work for the choice menu. All you have to do is style and re-position those choice buttons to be part of textbox.

Code: Select all

menu:
    "{i}You now have the option to move, talk and look around{/i}"

    "Move":
        jump move

    "Look around":
        jump look_around

    "Talk":
        jump talk
For infinite loop idea, you could just do:

Code: Select all

label the_option:

    "{i}You now have the option to move, talk and look around.{/i}"

    jump the_option
While this doesn't freeze the text on the screen, player will be greet with the text and not be able to progress further until they click on "move", "look around", or "talk" quick menu which will send player out of the loop.

Re: Display Text while renpy.pause()

Posted: Tue Oct 17, 2017 7:06 am
by Mangescom
I considered this possibility, I just would have prefered it without a choice menu being displayed.
I currently have this

Code: Select all

while True:
        "{i}You now have the option to move, talk and look around{/i}{w=9999}"
This gives the desired effect. There is only one small problem. Everytime the user clicks, the wait statement will be ignored /skipped and the message will be displayed again (ok from a display perspective). However this makes the back button unusable(The user might have to press back multiple times, since the same message might have been display multiple times) but that is a almost perfect solution.


UPDATE
I fixed this problem like this:

Code: Select all

$ quick_menu=True
while True:
        "{i}You now have the option to move, talk and gather notes{/i} {w=9999}"
        $renpy.rollback();
This finally creates the infinite loop I was looking for. Thanks a lot for your input!!!


UPDATE
I am stupid. After all the solution was so friggin easy. Forget about the loop

Code: Select all

$ quick_menu=True
"{i}You now have the option to move, talk and gather notes{/i} {w=9999}"
$renpy.rollback();
That is all that there is... No way, this confused me this hard :oops: