Forgive me bombarding the forum with questions, but I'm still trying to puzzle out the solution to my wardrobe/inventory/paperdoll problem. I am aware that Layered Images can be used in a "dressup" style screen, but is there any way to give the choices the player makes about their appearance knock-on effects (ie to set extra variables)?
In other words, say I had a "wardrobe" screen in my game that the player could return to whenever they wanted and change their outfit. If they were wearing pants and a tshirt, they couldn't get into the shower block. But if they switched into wearing a towel, then voila! They could finally get clean!
I tried adding an extra variable to my dressup screen like so:
layeredimage ethan:
always "player"
if outfit == 1:
"towel"
$ towel = True
if outfit == 2:
"boy_mode"
$ towel = False
but that didn't seem to work/do anything. Is this a possibility?
And on the same track, say later on the player went to a shop and bought a NEW TOWEL. Is there a way of adding/appending new items to the outfit choices later on down the line, or gating them off at the start until some extra flag has been tripped or whatever? (I hope i'm making sense!)
Or, alternately, is there some way of perhaps combining layered images with a classic inventory that kept track of players clothing choices and then displayed back what were wearing in real-time?
THanks in advance!
Layered Images and Variables
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.
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.
-
- Newbie
- Posts: 9
- Joined: Thu Jun 11, 2020 9:28 am
- Projects: Girl Games
- Contact:
- MaydohMaydoh
- Regular
- Posts: 165
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
- Contact:
Re: Layered Images and Variables
I don't think you can set variables within layered images. Couldn't you just use the outfit variable to check the outfit?
Instead of checking if $ towel is true or false, you could just check if $ outfit is 1.
As for the new towel thing, you could use a condition switch for the image
Instead of checking if $ towel is true or false, you could just check if $ outfit is 1.
As for the new towel thing, you could use a condition switch for the image
Code: Select all
image towel = ConditionSwitch(
"new_towel", "towel.png",
"True", "new_towel.png")
-
- Newbie
- Posts: 9
- Joined: Thu Jun 11, 2020 9:28 am
- Projects: Girl Games
- Contact:
Re: Layered Images and Variables
Ah, okay, this is starting to make sense to me now. Thanks so much for answering!
Who is online
Users browsing this forum: Ahrefs [Bot]