Using An Image File Instead Of A Name?

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
BlackFurushima
Newbie
Posts: 17
Joined: Fri Jan 18, 2013 10:00 pm
Location: east coast
Contact:

Using An Image File Instead Of A Name?

#1 Post by BlackFurushima »

I'm trying to show a headshot of the character instead of a name in defining a character on Renpy, but it isn't working! I guess the tutorial I'm using was outdated. Can anyone give me a quick template of a newer version?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Using An Image File Instead Of A Name?

#2 Post by PyTom »

Code: Select all

define e = Eileen(None, show_who_image="eileen.jpg")
Then in the say screen, replace:

Code: Select all

text who id "who"
with

Code: Select all

if who_image:
     add who_image
else:
     text who id "who"
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users