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!
[SOLVED]how to return the position call screen?
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.
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.
[SOLVED]how to return the position call screen?
Last edited by Charts on Tue Jul 18, 2017 10:30 am, edited 1 time in total.
- 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?
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.
Re: how to return the position call screen?
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
Re: how to return the position call screen?
Now I figure out that I misunderstood the way of using Screen.
I change the way like this:
and problem solved!
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!
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot]