Game Choices

Insanepenguin91

Member
Game Developer
May 18, 2017
403
3,446
I have quick question about if statements in renpy, i want to be able to give players the option to choose the outfit of the girls in the game. but im having problems with the if statements, i want the game to "show" - image a ( for example ) if they choose option a, but i also want the same options for image b - is there a way to create that without having to rewrite the scene per option? thanks in advance
 
Jul 1, 2018
31
24
I don't exactly see what you're actually coding but did you try using variables ? Like this
Code:
default clothes_choice = 0

image clothesA = "clothesa.png"
image clothesB = "clothesb.png"

menu:
            "What to wear ?"
            "Option A":
                             $ clothes_choice = 1
            "Option B":
                             $ clothes_choice = 2

if clothes_choice == 1:
             show clothesA
elif clothes_choice == 2:
             show clothesB
or maybe this (might be easier depending on your point of view)

Code:
image clothesA = "clothesa.png"
image clothesB = "clothesb.png"

menu:
            "What to wear ?"
            "Option A":
                             show clothesA
            "Option B":
                             show clothesB
but as I'm not an expert, I cannot confirm this works, but this is how I would try it in the first place :) Hope it helps !
 
  • Like
Reactions: MrJago