Change Side Image Expressions [SOLVED]

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.
Post Reply
Message
Author
User avatar
Windchimes
Veteran
Posts: 272
Joined: Fri Nov 27, 2015 9:02 am
Completed: Lads in Distress (NaNoRenO '16)
Projects: Lads in Distress (Expansion)
Organization: Catfish Crew
Contact:

Change Side Image Expressions [SOLVED]

#1 Post by Windchimes » Mon Jul 16, 2018 2:08 am

Hey everyone!

Sorry for the probably silly question. I'd really appreciate any help!

Okay, so basically, I've been using ConditionSwitch and LiveComposite for sprites up until now when I tried to switch over to LayeredImages instead. Following the documentation, I managed to set up the sprite and the side image with this:

Code: Select all

layeredimage test:
    group outfit auto
    group face auto

image side test = LayeredImageProxy("test", Transform(zoom=0.5))

define t = Character("Testing", image="test")
I decided to go with a permanent side image (rather than only when that char is speaking), so I added

Code: Select all

define config.side_image_tag = "test"
Everything works fine, and I can change expressions and stuff with say attributes

Code: Select all

t happy "I am now happy"
But my question is... is it possible to change the side image's expression without using say with image attribute? For example, as I said, the side image is always on screen, so I want her to react to what other characters are saying while she isn't talking, so I can't use a say with image attribute.

I tried doing a normal show line, but the problem is, the sprite also shows on screen like a normal sprite, so now there's two of the same character (one on the side, one at center of screen behind textbox) when I only want the side image to change.

Code: Select all

t happy "I am happy"
show test neutral
t "Now I'm neutral but there's two of me!"
If I use "show side test neutral" instead of just "show test neutral", it only shows the neutral sprite on screen while the side image stays unchanged.

Since I used to use LiveComposite and ConditionSwitch for sprites including the side sprite, I could change the side image's expressions with a $ variable any time I want, even if the character isn't talking. So I basically want to do that now but I'm not sure how without duplicating the sprite on screen. Is that possible? I'm assuming it is but I'm just missing a really obvious answer or doing something silly.

In any case, thanks for your patience, and I would be very grateful for any help!
Last edited by Windchimes on Wed Jul 18, 2018 1:55 am, edited 2 times in total.
Image

philat
Eileen-Class Veteran
Posts: 1445
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Change Side Image Expressions

#2 Post by philat » Mon Jul 16, 2018 2:30 am

Does spoofing it with

Code: Select all

t neutral "{nw}"
work? (I never use side images so I can't test.)

User avatar
Windchimes
Veteran
Posts: 272
Joined: Fri Nov 27, 2015 9:02 am
Completed: Lads in Distress (NaNoRenO '16)
Projects: Lads in Distress (Expansion)
Organization: Catfish Crew
Contact:

Re: Change Side Image Expressions

#3 Post by Windchimes » Wed Jul 18, 2018 1:54 am

That does actually work! I ended up having to go into history screen and add a line so that if the dialogue is only {nw} it doesn't show in history so that there won't be awkward empty lines messing up the spacing. Everything else does work now the way I want it to. Thank you!
Image

Post Reply

Who is online

Users browsing this forum: No registered users