Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
I'm making a game where the characters can switch hairstyles and outfits. Some of them have a hood. How do I hide the hair ONLY when a hood is equipped?
I don't really use layeredimages (never had a need), so take what I'm saying here with a grain of salt, but.
1. This thread looks interesting for more advanced stuff, see if that works. viewtopic.php?f=8&t=56250
2. From what I can tell, layeredimage should be able to take DDs rather than just straight files, so you could theoretically do this (which seems to work based on barebones tests in a clean project, but obvs I can't test with your files).
Sorry for the late reply. Got it fixed!
So I chose to remove the hood variable (cause it would cause the model's hair to unequip even when wearing a different hat).
Instead I did this:
if hat == 9:
"models/green/hair/noHair.png" # empty png
elif hair == 1:
"hair1.png"
Seeing as it goes by the if statement first (and sees it's true) it never goes past the elif statement afterwards.
Thank you guys so much, I wouldn't have thought of this without you!