Wardrobe problems
Posted: Sun Oct 30, 2022 7:47 am
Hi! Need some help!
I'm working on a wardrobe. I'm basing it on viewtopic.php?f=52&t=56853&p=518898&hil ... up#p518898
I will be adding new characters later. So in the places where variables change, I have added chara+
I want to implement two arrows. As in the example. Clicking on which flips through all the eye, hair, etc. options in order.
That's about what I would like it to look like. But it's not working out for me.
I hope I have managed to explain my problem 
I just started to learn RenPy
I will be very glad if somebody could help me.
I'm working on a wardrobe. I'm basing it on viewtopic.php?f=52&t=56853&p=518898&hil ... up#p518898
I will be adding new characters later. So in the places where variables change, I have added chara+
Code: Select all
### This is roughly what commposit looks like
init:
default sakura_handB = 1
default sakura_body = 1
image sakura = Composite(
(810, 1440),
(0, 0), "chara/sakura/body/handB/sakura_handb[sakura_handB].png",
(0, 0), "chara/sakura/body/base/sakura_body[sakura_body].png",
)
Code: Select all
screen wardrobe(chara):
imagemap:
idle "gui/wardrobe/wardrobe2.png"
hover "gui/wardrobe/wardrobe3.png"
selected_idle "gui/wardrobe/wardrobe1.png"
selected_hover "gui/wardrobe/wardrobe1.png"
hotspot(500, 200, 280, 150) action SetVariable(chara+"_eyes", 1) ### There's a hotspot for changing eyes
Code: Select all
###That's how it worked out for me. The downside is that in order to add another character, I need to add two lines to each category
#<eye#
hotspot(1580, 210, 175, 120):
if chara == "hermione":
action If(hermione_eyes > 1, SetVariable("hermione_eyes", hermione_eyes - 1), SetVariable("hermione_eyes", 1))
elif chara == "sakura":
action If(sakura_eyes > 1, SetVariable("sakura_eyes", sakura_eyes - 1), SetVariable("sakura_eyes", 1))
#eye>#
hotspot(1755, 210, 175, 120):
if chara == "hermione":
action If(hermione_eyes < hermione_eyes_max, SetVariable("hermione_eyes", hermione_eyes + 1), SetVariable("hermione_eyes", hermione_eyes_max))
elif chara == "sakura":
action If(sakura_eyes < sakura_eyes_max, SetVariable("sakura_eyes", sakura_eyes + 1), SetVariable("sakura_eyes", sakura_eyes_max))
Code: Select all
hotspot(1580, 210, 175, 120) action If(chara+"_eyes" > 1, SetVariable(chara+"_eyes", chara+"_eyes" - 1), SetVariable(chara+"_eyes", 1))
hotspot(1755, 210, 175, 120) action If(chara+"_eyes" < chara+"_eyes_max", SetVariable(chara+"_eyes", chara+"_eyes" + 1), SetVariable(chara+"_eyes", chara+"_eyes_max"))
I just started to learn RenPy
I will be very glad if somebody could help me.