Why are my character expressions not changing?

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
NeuroDolphin
Newbie
Posts: 3
Joined: Wed Aug 22, 2018 6:36 pm
Projects: A Cry in the Dark
Contact:

Why are my character expressions not changing?

#1 Post by NeuroDolphin » Mon Aug 27, 2018 8:21 pm

RESULT:
Defined characters only appear with a fixed asset, and their assets will not change after that even when instructed.

Call will always appear as temp_call_basic.png
Bel will always appear as temp_beluga_talking.png

EXPECTED RESULT:

Both characters should swap out sprite images when the relevant asset is called for in their lines.


Code: Select all

define c = Character("Call", image="call")

image c standard = "temp_call_basic.png"
image c concerned = "temp_call_concerned.png"
image c giggidy = "temp_call_giggidy.png"
image c annoyed = "temp_call_annoyed.png"
image c laughing = "temp_call_laugh.png"
image c shocked = "temp_call_shock.png"
image c talking = "temp_call_talk.png"
image c happy = "temp_call_happy.png"
image c yikes = "temp_call_yikes.png"
image c angry = "temp_call_grumble.png"

define Bel = Character("Receptionist", image="beluga")

image Bel talking = "temp_beluga_talk.png"
image Bel worried = "temp_beluga_worry.png"
image Bel annoyed = "temp_beluga_annoyed.png"

label start:

    scene temp_hprlobby
    
    show c standard at left
    with dissolve

    c "This place is huge."
    c "I knew HPR was big, but this is the biggest headquarters I've ever seen. Right downtown, too!"
    c "Ah, an Information Desk."
    c talking "Excuse me, I -"
    show Bel talking at right
    with dissolve
    Bel "Appointment?"
    c concerned "Ah. I'm not sure, actually. I'm Offi-"
    Bel "I said, APPOINTMENT?"
    Bel annoyed "Well!?"
    c angry "... Yeah, send me to whoever's dealing with the UHCA. I don't have time for your attitude."
    Bel worried "..."
    Bel talking "You'll want Mr. Mitton. Upstairs and to the right."
    c annoyed "Very well. Thank you."

    return
    
I have read the guide on "side images" about 4000 times over, and as far as I can tell I've done it just the way it's been written on the screen. I just don't understand why the expressions aren't changing. The code compiles, because the game launches, but yeah. Augh!
Please help if you can... I'm an artist, not a coder!

User avatar
MaydohMaydoh
Regular
Posts: 145
Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:

Re: Why are my character expressions not changing?

#2 Post by MaydohMaydoh » Mon Aug 27, 2018 8:56 pm

You've defined the character image as something different from the image name.

Code: Select all

define c = Character("Call", image="call")

image call standard = "temp_call_basic.png"
## etc...

define Bel = Character("Receptionist", image="beluga")

image beluga talking = "temp_beluga_talk.png"
## etc...
The character image is to tell renpy what image to use. In the first one, you have call, so it will use images with that same name.

User avatar
NeuroDolphin
Newbie
Posts: 3
Joined: Wed Aug 22, 2018 6:36 pm
Projects: A Cry in the Dark
Contact:

Re: Why are my character expressions not changing?

#3 Post by NeuroDolphin » Tue Aug 28, 2018 11:09 am

Thank you for responding.

For now, I have fixed it by using the show command for each instance of image swapping.

Code: Select all

show c annoyed
c "I'm annoyed."
show c happy
c "But now I'm not!"
Thanks again for taking the time to answer!

User avatar
TAEKO
Newbie
Posts: 21
Joined: Mon Jul 23, 2018 3:24 am
Contact:

Re: Why are my character expressions not changing?

#4 Post by TAEKO » Thu Sep 06, 2018 1:52 am

You know a better way to do that is to either do as the person above did it and change all images or do this
From:

Code: Select all

define c = Character("Call", image="call")
Change it to:

Code: Select all

define c = Character("Call", image="c")
So it will always call all images tagged with "c" and you don't have to always write 'show'...
Don't read me...
Seriously don't.
Just kidding. I'm just an awkward potato who doesn't know what to say in my signature...

Post Reply

Who is online

Users browsing this forum: Google [Bot]