Ren'Py help multi menus

forumgr

New Member
Oct 23, 2022
1
0
Hello,
i am new with Ren'Py , i want to make a easy true of false game....
i would like to saw an image and the user must to select if it is correct or incorrect,
if choice is correct then go to the next image and again and again
if not, then loop through the same image and ask them to try again

Python:
label start:
    scene anything
    "Welcome , do  you want to play?"
    
 menu:
        "YES":
            jump choice1_yes
        "NO":
            jump choice1_no

    label choice1_no:
        $ menu_flag = False
        "MAYBE LATER YOU WANT TO PLAY"
        jump choice1_done

    label choice1_yes:
        $ menu_flag = True
         "LETS GO THEN"

#START GAME

        label pista1:
        scene image_1  #SHOW IMAGE
            menu:
                "TRUE":
                    jump choice2_yes
                "FALSE":
                    jump choice2_no
            label choice2_yes:
                $ menu_flag = False
                 "TRY AGAIN"
                    call label pista1:
                jump choice2_done
                
                
             label choice2_no:
                 $ menu_flag = True
                 t "GOOD TRY ANOTHER IMAGE"
        
        label pista2:
        scene image_2  #SHOW second IMAGE
            menu:
                "TRUE":
                    jump choice3_yes
                "FALSE":
                    jump choice3_no
            label choice3_yes:
                $ menu_flag = False
                 "TRY AGAIN"
                    call label pista2:
                jump choice3_done
                
                
             label choice3_no:
                 $ menu_flag = True
                 t "GOOD TRY ANOTHER IMAGE"
                
                 #again ......
                
                 jump choice3_done

    jump choice1_done
    label choice1_done:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,188
if choice is correct then go to the next image and again and again
if not, then loop through the same image and ask them to try again
Then you can rely on the possibility for s to double as a label.

Python:
label whatever:
    scene whatever
    "Welcome."

    menu:
        "Do you want to play ?"

        "YES":
             $ menu_flag = True
             "LETS GO THEN"
             scene image_1
             jump choice1

        "NO":
            $ menu_flag = False
            "MAYBE LATER YOU WANT TO PLAY"
            jump weAreDone

label weAreDone:
    "Well, goodbye then."
    return

label wrongAnswer:
    $ menu_flag = False
    "Try again."
    return

label rightAnswer:
    $ menu_flag = True
    "Good, try another image."
    return

menu choice1:
    "True":
        call wrongAnswer
        jump choice1
    "False":
        call rightAnswer
        scene image_2
        jump choice2

menu choice2:
    "True":
        call wrongAnswer
        jump choice2
    "False":
        call rightAnswer
        scene image_2
        jump choice3
 
  • Like
Reactions: 79flavors