Ren'Py Text box and sex scene help

ulala0077

Member
Game Developer
Mar 15, 2018
137
484
Hi, I don't have any skill in coding, so please try to keep it as simple as possible. I have an AMD gpu laptop, and being a total noob, I have decided to avoid animations until I can afford a decent nvidia rig.

What I want is to do a clickable sex scene, i.e. it gives you a menu choice like choosing blowjob, missionary, cowgirl etc. and after choosing the choice it hides the text box and pauses the texts for a while, you click click and it looks like a bit animated for a while and then the menu option appears again.

I hope I am able to describe it as I don't know the technical term for it.
 
  • Like
Reactions: MFN

MFN

Well-Known Member
Game Developer
Mar 20, 2019
1,004
1,849
Maybe you need "ImageMap" for choose sex scenes :unsure: And so that after playing the scene the game returns back to the choice of action, you need to make a "label"...
 

MFN

Well-Known Member
Game Developer
Mar 20, 2019
1,004
1,849
Or that:
Ex:
label sex1:
scene
menu:
"Blowjob":
scene
scene
jump sex1
"missionary":
scene
scene
jump sex1
"end":
jump start2
label star2:
scene
Etc.

Sorry for awful code, just i write it from my phone :)
 
  • Like
Reactions: ulala0077

ulala0077

Member
Game Developer
Mar 15, 2018
137
484
Or that:
Ex:
label sex1:
scene
menu:
"Blowjob":
scene
scene
jump sex1
"missionary":
scene
scene
jump sex1
"end":
jump start2
label star2:
scene
Etc.

Sorry for awful code, just i write it from my phone :)
Thanks for replying. I tried this, but it is not showing any scene due without any text and is skipping displaying them.
 
  • Like
Reactions: MFN

MFN

Well-Known Member
Game Developer
Mar 20, 2019
1,004
1,849
Thanks for replying. I tried this, but it is not showing any scene due without any text and is skipping displaying them.
If you have the opportunity, show what code you have, so that you can understand what the problem is
 
  • Like
Reactions: ulala0077

ulala0077

Member
Game Developer
Mar 15, 2018
137
484
If you have the opportunity, show what code you have, so that you can understand what the problem is
label testsex1:
scene dbal1
menu:
"blowjob":
scene dbal2
scene dbal3
scene dbal4
scene dbal5
jump testsex1
"cowgirl":
scene dbal6
scene dbal7
scene dbal8
scene dbal9
 
  • Like
Reactions: MFN

MFN

Well-Known Member
Game Developer
Mar 20, 2019
1,004
1,849
I put my script, look at 333 - 376 line.
Also, if you have discord, you can ask these guys. There are very much people, who help me with my questions. ( )
Or if you dont have discord, I can ask, maybe someone can help you :)
 
  • Like
Reactions: ulala0077

MFN

Well-Known Member
Game Developer
Mar 20, 2019
1,004
1,849
It's bad that forum posts don't remember spaces in the code )))
I'm sorry if I couldn't help
 
  • Like
Reactions: ulala0077

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,705
It's bad that forum posts don't remember spaces in the code )))
I'm sorry if I couldn't help
You can put the code between (code=python) and (/code) ***NOTE: Replace the () with []


As for the code to do what you want, it can be done simply with menus or with some screen showing an option box.

With menus, and several options:
Python:
label sex_options:
    scene sex_intro   ### Your initial image
    menu:
        "What do you want to do?"   ### If you want, you can use a line of text for the menu (only works for 1 line)
        
        "Blowjob":   ### In this case, the code is executed right here and then returns to the menu
            scene blowjob_1 with dissolve
            pause 0.5   ### After 0.5 seconds it will automatically show to the next image
            scene blowjob_2 with dissolve
            pause 0.5
            scene blowjob_3 with dissolve
            pause 0.5
            scene blowjob_4 with dissolve
            pause 0.5
            jump sex_options

        "Missionary":   ### In this case, you jump to the corresponding label
            jump missionary

        "Cowgirl":    ### In this case, you jump to the corresponding label
            jump cowgirl


label missionary:
    scene missionary_1 with dissolve
    pause    ### It will not jump to the next image until the player makes a click
    scene missionary_2 with dissolve
    pause
    scene missionary_3 with dissolve
    pause
    scene missionary_4 with dissolve
    pause
    jump sex_options

label cowgirl:
    scene cowgirl_1 with dissolve
    $ renpy.pause(0.5, hard=True)   ### You force a 0.5 second pause; the player cannot advance by clicking (NOTE: Use with caution, players don't like to be forced, lol)
    scene cowgirl_2 with dissolve
    $ renpy.pause(0.5, hard=True)
    scene cowgirl_3 with dissolve
    $ renpy.pause(0.5, hard=True)
    scene cowgirl_4 with dissolve
    $ renpy.pause(0.5, hard=True)
    jump sex_options
 

MFN

Well-Known Member
Game Developer
Mar 20, 2019
1,004
1,849
You can put the code between (code=python) and (/code) ***NOTE: Replace the () with []


As for the code to do what you want, it can be done simply with menus or with some screen showing an option box.

With menus, and several options:
Python:
label sex_options:
    scene sex_intro   ### Your initial image
    menu:
        "What do you want to do?"   ### If you want, you can use a line of text for the menu (only works for 1 line)
       
        "Blowjob":   ### In this case, the code is executed right here and then returns to the menu
            scene blowjob_1 with dissolve
            pause 0.5   ### After 0.5 seconds it will automatically show to the next image
            scene blowjob_2 with dissolve
            pause 0.5
            scene blowjob_3 with dissolve
            pause 0.5
            scene blowjob_4 with dissolve
            pause 0.5
            jump sex_options

        "Missionary":   ### In this case, you jump to the corresponding label
            jump missionary

        "Cowgirl":    ### In this case, you jump to the corresponding label
            jump cowgirl


label missionary:
    scene missionary_1 with dissolve
    pause    ### It will not jump to the next image until the player makes a click
    scene missionary_2 with dissolve
    pause
    scene missionary_3 with dissolve
    pause
    scene missionary_4 with dissolve
    pause
    jump sex_options

label cowgirl:
    scene cowgirl_1 with dissolve
    $ renpy.pause(0.5, hard=True)   ### You force a 0.5 second pause; the player cannot advance by clicking (NOTE: Use with caution, players don't like to be forced, lol)
    scene cowgirl_2 with dissolve
    $ renpy.pause(0.5, hard=True)
    scene cowgirl_3 with dissolve
    $ renpy.pause(0.5, hard=True)
    scene cowgirl_4 with dissolve
    $ renpy.pause(0.5, hard=True)
    jump sex_options
Thank you :)
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,705
With "screen" it could be something like this:
Python:
label your_story:
    "...."
    scene your_initial_image
    show screen sex_options   ### Shows the screen
    pause



screen sex_options:   ### Screen with text options; if you want images instead of text, use imagebuttons
    modal True   ### Prevents the player from clicking off the screen

    xalign 1.0   ### Align to the right
    yalign 0.0   ### Align to the top

    vbox:   ### Create a vertical "box" of options, if you want horizontal options use "hbox"
        textbutton "Blowjob" action Jump("blowjov")
        textbutton "Missionary" action Jump("missionary")
        textbutton "Cowgirl" action Jump("cowgirl")
        textbutton "Continue" action Jump("next_story")



label blowjob:   ### This will create a repetitive sequence (loop); and having "modal True" on the screen, the player cannot click on the image to proceed, just select another option
    scene blowjob_1 with dissolve:
        pause 0.5
        "blowjob_2" with dissolve
        pause 0.5
        "blowjob_3" with dissolve
        pause 0.5
        "blowjob_4" with dissolve
        pause 0.5
        repeat
    pause



label missionary:
    scene missionary_1 with dissolve:
        pause 0.5
        "missionary_2" with dissolve
        pause 0.5
        "missionaryl_3" with dissolve
        pause 0.5
        "missionary_4" with dissolve
        pause 0.5
        repeat
    pause



label cowgirl:
    scene cowgirl_1 with dissolve:
        pause 0.5
        "cowgirl_2" with dissolve
        pause 0.5
        "cowgirl_3" with dissolve
        pause 0.5
        "cowgirl_4" with dissolve
        pause 0.5
        repeat
    pause

label next_story:   ### The game continues
    hide screen sex_options   ### Hides the screen
    "..."

NOTE: I have written the code quickly and without testing it, there may be some unintended error in it, lol... if you have any problems please let me know ;)
 
Last edited:
  • Like
Reactions: ulala0077 and MFN

ulala0077

Member
Game Developer
Mar 15, 2018
137
484
You can put the code between (code=python) and (/code) ***NOTE: Replace the () with []


As for the code to do what you want, it can be done simply with menus or with some screen showing an option box.

With menus, and several options:
Python:
label sex_options:
    scene sex_intro   ### Your initial image
    menu:
        "What do you want to do?"   ### If you want, you can use a line of text for the menu (only works for 1 line)
       
        "Blowjob":   ### In this case, the code is executed right here and then returns to the menu
            scene blowjob_1 with dissolve
            pause 0.5   ### After 0.5 seconds it will automatically show to the next image
            scene blowjob_2 with dissolve
            pause 0.5
            scene blowjob_3 with dissolve
            pause 0.5
            scene blowjob_4 with dissolve
            pause 0.5
            jump sex_options

        "Missionary":   ### In this case, you jump to the corresponding label
            jump missionary

        "Cowgirl":    ### In this case, you jump to the corresponding label
            jump cowgirl


label missionary:
    scene missionary_1 with dissolve
    pause    ### It will not jump to the next image until the player makes a click
    scene missionary_2 with dissolve
    pause
    scene missionary_3 with dissolve
    pause
    scene missionary_4 with dissolve
    pause
    jump sex_options

label cowgirl:
    scene cowgirl_1 with dissolve
    $ renpy.pause(0.5, hard=True)   ### You force a 0.5 second pause; the player cannot advance by clicking (NOTE: Use with caution, players don't like to be forced, lol)
    scene cowgirl_2 with dissolve
    $ renpy.pause(0.5, hard=True)
    scene cowgirl_3 with dissolve
    $ renpy.pause(0.5, hard=True)
    scene cowgirl_4 with dissolve
    $ renpy.pause(0.5, hard=True)
    jump sex_options
It is working flawlessly! Thank you very much! :)
 
  • Like
Reactions: Porcus Dev and MFN