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.
show argus_smile
with Dissolve(.3)
a "...and that's why Grandma stopped calling."
hide argus_smile
show cecille_heh
c "..."
hide cecille_heh
show tom_heh
with Dissolve(.3)
show tom_smile
"..."
hide tom_smile
show tom_heh
t "eheh..."
hide tomoheh
show bill_heh
with Dissolve(.3)
b "..."
hide bill_heh
with Dissolve(.3)
I can't help but think i could be doing this in a much more efficient manner. Each character has many different images with varying emotions. whenever I switch a character's emotion, I have to hide the previous one then show the new one. And whenever I switch images whether it's the background or the sprites, I always have to say with dissolve so that the transitions aren't super jarring.
I guess what I'm asking is, what could I be doing to cut down on the repetition and save space?
Well, in general, the first word of your image definition is the tag and showing an image with the same tag will replace the existing image. So if your images were named 'tom smile' and 'tom heh', for example, you wouldn't have to hide one before showing the other. More specifically, here it looks like you want to be using side images.
Also, it seems like you only show one sprite at a time, so you could have them all use the same tag, like 'pic tom_smile' and 'pic bill_heh'. Showing one will automatically hide the other.
Unless you are effectively using side images, then just go with what irredeemable wrote.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)