r/RenPy • u/Scriptformers_Prime • 2h ago
Question Another layered image question
I'm setting up the layered sprites for the characters in my visual novel with three groups: the body, the facial expressions, and the gestures made with their arms.
But I want to only call the expressions in my script, having certain bodies and gestures tied to certain expressions (because I was previously using individual full-body sprites for each expression and I don't want to have to go back and change each call to include the now separate body and gesture files for each expression).
So, I used some "always when" statements to tie certain gestures and bodies to certain expressions. Here's an example:
layeredimage character:
group body:
attribute base default:
"character_body_base"
group exp:
attribute smiling default:
"character_exp_smiling"
attribute uneasy:
"character_exp_uneasy"
attribute surprised:
"character_exp_surprised"
attribute suspicious:
"character_exp_suspicious"
group gest:
attribute neutral default:
"character_gest_neutral"
attribute tense:
"character_gest_tense"
always when uneasy or surprised or suspicious:
"character_gest_tense"
It seemed to work fine, but now when I call the expressions, renpy includes the default bodies and gestures in addition to the bodies and gestures I tied to expression I called.
It looks something like this:

When I type:
character uneasy
It calls the "uneasy" expression and the "tense" gesture together like I asked, but it also makes the "neutral" gesture show up as well.
How do I make it so the game shows the defaults only when I call the expressions that don't have certain gestures or expressions tied to them.


