[Solved] Action "Jump to the next page"?

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
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

[Solved] Action "Jump to the next page"?

#1 Post by Nanahs »

I needed a textbutton that would simply jump to the next label, without "telling" which label it is. Something that has the same function of jumping as when you click anywehere on the game screen.

So I found (https://www.renpy.org/doc/html/screen_actions.html):

Code: Select all

FilePageNext(max=None, wrap=False, auto=True, quick=True) link
Goes to the next file page.

max
If set, this should be an integer that gives the number of the maximum file page we can go to.
wrap
If true, we can go to the first page when on the last file page if max is set.
auto
If true and wrap is set, this can bring the player to the page of automatic saves.
quick
If true and wrap is set, this can bring the player to the page of automatic saves.
I tried using it many ways, like this one:

Code: Select all

screen taptoanswer:

        textbutton "{image=taptoanswer}" action FilePageNext()
But it didn't work. It's actually blocking to the game from jumping to the next label :?: :lol:

The reason why I want a button that simply jumps to the next part without "telling" the label, is that I'm using it in my messenger.

Image

This screen would always show up when the player can answer the message.
I wanted the person to be able to answer (go to the next label) only when clicking where it's "ANSWER".

If I use something like:

Code: Select all

screen taptoanswer:

        textbutton "{image=taptoanswer}" action Jump(jhonchat3)
I will have to create different a screen to each jump. And that you be A LOT and very confusing :lol:

So I wanted one simple buttom that would simply jump to the next label, without the need of specifying it.

Does anyone know if this code still works, or if I can use it or a code like this for that purpose?
Maybe this one is for "saved files" and I'm trying to use it for something that has nothing to do with it :?: :?: (which I believe that it's what's happening :oops: :lol: )

Thanks.
Last edited by Nanahs on Sat Feb 02, 2019 3:01 pm, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Action "Jump to the next page"?

#2 Post by Alex »

Yes, this is the wrong action - it used in save/load screens only to move through the pages of save slots.
Try Return() action, it makes the game progress like if player clicks - https://www.renpy.org/doc/html/screen_a ... tml#Return
If it won't solve your issue, then show the code you have:
- how you use this screen (show or call),
- what are those labels you want the game jump to,
- how this message system works, etc.

User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: Action "Jump to the next page"?

#3 Post by Nanahs »

Alex wrote: Sat Feb 02, 2019 10:13 am Yes, this is the wrong action - it used in save/load screens only to move through the pages of save slots.
Try Return() action, it makes the game progress like if player clicks - https://www.renpy.org/doc/html/screen_a ... tml#Return
If it won't solve your issue, then show the code you have:
- how you use this screen (show or call),
- what are those labels you want the game jump to,
- how this message system works, etc.
Thank you! :)

User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: Action "Jump to the next page"?

#4 Post by Nanahs »

It worked like this:

Code: Select all

screen taptoanswer():
    modal True
    textbutton "{image=taptoanswer}" pos(250,1180) action Return()
Thanks :)

User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: Action "Jump to the next page"?

#5 Post by Nanahs »

Alex wrote: Sat Feb 02, 2019 10:13 am Yes, this is the wrong action - it used in save/load screens only to move through the pages of save slots.
Try Return() action, it makes the game progress like if player clicks - https://www.renpy.org/doc/html/screen_a ... tml#Return
If it won't solve your issue, then show the code you have:
- how you use this screen (show or call),
- what are those labels you want the game jump to,
- how this message system works, etc.
Hello!
Sorry to bother you again.

But when I use:

Code: Select all

screen taptoanswer():
    modal True
    textbutton "{image=taptoanswer}" pos(250,1180) action Return()
The other textbuttons become "unclickable" and also the scrollbar. Is it the "modal True" that does it?

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: [Solved] Action "Jump to the next page"?

#6 Post by Alex »

Yes, modal property forces player to interact with the given screen and not the others, so you need to put your "tap to answer" button in a screen with other buttons to make them work simultaneously.
https://www.renpy.org/doc/html/screens. ... -statement

User avatar
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: [Solved] Action "Jump to the next page"?

#7 Post by Nanahs »

Alex wrote: Sat Feb 02, 2019 7:21 pm Yes, modal property forces player to interact with the given screen and not the others, so you need to put your "tap to answer" button in a screen with other buttons to make them work simultaneously.
https://www.renpy.org/doc/html/screens. ... -statement
Oh, ok. Thank you! And thanks for the link :)

Post Reply

Who is online

Users browsing this forum: No registered users