[solved]How to both react with textbox and 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
User avatar
Li yuanlin
Regular
Posts: 94
Joined: Sat Aug 04, 2018 8:42 pm
Location: Hong Kong
Contact:

[solved]How to both react with textbox and screen?

#1 Post by Li yuanlin »

I want to Implement a function that click to react with textbox,when player clicks button in screen then show textbox and continue react with screen.
What's more,when player finished task,jump to label based on grade,with several reactions with textbox then click to return main_menu or label where called from

Code: Select all

screen briefing_mission(vehicle="fire_engine",type="fire_misson",area="M区F丁目",misson=1,level=0):
    tag briefing
    modal False
    ......

label battle_finished:
    "firefighters" "misson complete."

    # jump shinjuku_fire_station_ch_01_ready
    return

label shinjuku_fire_station_ch_01:
    stop music fadeout 1.0
    call animated_worldmap(city='tokyo')
    call loading
    $ battle_status = "hold_on"

    show screen briefing_mission()

    dc "OK,let's have a briefing"
    dc "in district D235 there is a big fire on apartment Mallhood...."

    $ battle_status = "ready"

    call screen briefing_mission()

    pause

    return
I tried Jump from screen action but when textbox showed screen was hidden
Last edited by Li yuanlin on Fri Jun 30, 2023 3:11 am, edited 1 time in total.
stay hungry,stay foolish.

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

Re: How to both react with textbox and screen?

#2 Post by Alex »

Li yuanlin wrote: Thu Jun 29, 2023 3:19 am ...I tried Jump from screen action but when textbox showed screen was hidden
You need to 'show' screen instead of 'call' it. And you can use ui.interact() to wait for player's interaction with game.
https://www.renpy.org/doc/html/screens. ... statements
https://www.renpy.org/doc/html/screen_p ... i.interact


Kind of sample - viewtopic.php?f=51&t=18047&start=15#p395928

User avatar
Li yuanlin
Regular
Posts: 94
Joined: Sat Aug 04, 2018 8:42 pm
Location: Hong Kong
Contact:

Re: How to both react with textbox and screen?

#3 Post by Li yuanlin »

Alex wrote: Thu Jun 29, 2023 3:35 pm
Li yuanlin wrote: Thu Jun 29, 2023 3:19 am ...I tried Jump from screen action but when textbox showed screen was hidden
You need to 'show' screen instead of 'call' it. And you can use ui.interact() to wait for player's interaction with game.
https://www.renpy.org/doc/html/screens. ... statements
https://www.renpy.org/doc/html/screen_p ... i.interact


Kind of sample - viewtopic.php?f=51&t=18047&start=15#p395928
Got it,thx for reply.
stay hungry,stay foolish.

Post Reply

Who is online

Users browsing this forum: Ocelot