[SOLVED]how to return the position call screen?

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
Charts
Newbie
Posts: 9
Joined: Sun Jan 01, 2017 10:37 pm
Contact:

[SOLVED]how to return the position call screen?

#1 Post by Charts »

I wrote a call screen in a label. The screen is used to display the rpg battle.
However,I got problem in quitting the screen and return to the CALL position.

I tried to use IF to make it happen:
screen battle:
#(The other statements are notshows here)
if HP<0:
text [HP]
actionJump("end")
#actionHide("")
The if works fine, but I could never quit the screen.
Really hope some dalao could lend me a hand, THX!
Last edited by Charts on Tue Jul 18, 2017 10:30 am, edited 1 time in total.

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: how to return the position call screen?

#2 Post by Scribbles »

I'm not 100% sure on what you're asking? You can use Return() to return from a screen, or Hide("my_screen") though hide won't return you back where you were. (you might want to place your code in brackets --> [ code ] [/ code ] (without the spaces) makes it easier to read. I'm also not sure why you wrote a screen inside of a label? I think they're typically supposed to be initialized prior to the rest of the game starting.
Image - Image -Image

Charts
Newbie
Posts: 9
Joined: Sun Jan 01, 2017 10:37 pm
Contact:

Re: how to return the position call screen?

#3 Post by Charts »

Scribbles wrote:I'm not 100% sure on what you're asking? You can use Return() to return from a screen, or Hide("my_screen") though hide won't return you back where you were. (you might want to place your code in brackets --> [ code ] [/ code ] (without the spaces) makes it easier to read. I'm also not sure why you wrote a screen inside of a label? I think they're typically supposed to be initialized prior to the rest of the game starting.

Thank you for your reply. Im not very good at english, so the words might confuse you.
Im not write a screen inside a label, in fact,inside a label,i call the screen so the story stops and battle begins. while the battle ends, i need to continue the story. Thats where I got stuck.

Im not at home right now, I'll post the codes while get home.
Thanks again for your help

Charts
Newbie
Posts: 9
Joined: Sun Jan 01, 2017 10:37 pm
Contact:

Re: how to return the position call screen?

#4 Post by Charts »

Now I figure out that I misunderstood the way of using Screen.

I change the way like this:

Code: Select all

label fight:
    show screen fight_screen
    "HP is [HP]"    
    while HP > 200:
        $HP = HP -100
        pause
    while HP <= 200:
    #else:
        hide screen fight_screen
        return 

and problem solved!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]