Character Images

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
PixelProofInc
Newbie
Posts: 5
Joined: Wed Nov 15, 2017 2:59 pm
Contact:

Character Images

#1 Post by PixelProofInc »

For the life of me, I cannot seem to figure out how to display a character image whenever a character speaks. I know about the show image and hide image variables, but how do I make it so that whenever something is this is happens:

define b = Character("bob")

image bob normal = Image("Bob_normal.png")

b "I like to play video games"


How do I make it so that character b always displays the image "bob_normal" everytime he speaks? Thank you

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Character Images

#2 Post by Imperf3kt »

Code: Select all

define b = Character("bob, image="bob")
# using single letters for this is not recommended

image bob normal = "Bob_normal.png"
Personally, I've never gotten 'bob normal' to work, instead I define one character per image.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

PixelProofInc
Newbie
Posts: 5
Joined: Wed Nov 15, 2017 2:59 pm
Contact:

Re: Character Images

#3 Post by PixelProofInc »

Imperf3kt wrote: Wed Nov 15, 2017 4:26 pm

Code: Select all

define b = Character("bob, image="bob")
# using single letters for this is not recommended

image bob normal = "Bob_normal.png"
Personally, I've never gotten 'bob normal' to work, instead I define one character per image.
I have tried doing what you said, but it doesn't seem to be working. The image relating to Bob isn't displaying when I play through the game

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Character Images

#4 Post by Imperf3kt »

Then you got the same result I did.

Just remove the word "normal" from 'image bob normal'
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

PixelProofInc
Newbie
Posts: 5
Joined: Wed Nov 15, 2017 2:59 pm
Contact:

Re: Character Images

#5 Post by PixelProofInc »

I have tried that, yet Bob's character image isn't being displayed. Thanks for the help though!

Post Reply

Who is online

Users browsing this forum: No registered users