How do I make an Independent Side-Image for One Character?

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
SerenaLolipop
Regular
Posts: 44
Joined: Sat Mar 05, 2011 6:48 pm
Projects: Snow White Otome
Contact:

How do I make an Independent Side-Image for One Character?

#1 Post by SerenaLolipop »

I've been trying to do a Condition Switch(which I think making an independent side image for one character IS but...), but it's not working.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rainbows make the world go round... Or was it that rainbows go around the world?

Jewels are Expensive. But Friendship is Priceless.

I was going to take over this website but then I got distracted by Gakuen Alice.

Ran is in the middle of her own otome game right now, Snow White!
-------------------------------Ciaossu!------------------------------------------------

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How do I make an Independent Side-Image for One Characte

#2 Post by Aleema »

What do you mean by "independent"?

SerenaLolipop
Regular
Posts: 44
Joined: Sat Mar 05, 2011 6:48 pm
Projects: Snow White Otome
Contact:

Re: How do I make an Independent Side-Image for One Characte

#3 Post by SerenaLolipop »

i mean that it's only by itself with no other image up. I think it's called a Condition Switch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rainbows make the world go round... Or was it that rainbows go around the world?

Jewels are Expensive. But Friendship is Priceless.

I was going to take over this website but then I got distracted by Gakuen Alice.

Ran is in the middle of her own otome game right now, Snow White!
-------------------------------Ciaossu!------------------------------------------------

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How do I make an Independent Side-Image for One Characte

#4 Post by Aleema »

Hmm. No. It's called just a side-image, and you personally don't code it so other images show up. ConditionSwitch() is a function that switches images based on a variable, and can be used for a variety of things. Let me guess that you're making a side image for your MC? Here's the code for that:

Code: Select all

$ e = Character('Eileen', show_side_image=ConditionSwitch(
        "eileen_emote == 'happy'", "eileen_happy.jpg",
        "eileen_emote == 'normal'", "eileen.jpg",
        ))
$ eileen_emote would be a variable that you would change, but right now that code only recognizes "happy" and "normal".

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: How do I make an Independent Side-Image for One Characte

#5 Post by PyTom »

I'll point out that nowadays, the best way to do a side image is:

Code: Select all

define e = Character("Eileen", image="eileen")

image eileen happy = "eileen_happy.png"
image eileen normal = "eileen_normal.png"

image side eileen happy = "side_eileen_happy.png"
image side eileen normal = "side_eileen_normal.png"
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

User avatar
AERenoir
Veteran
Posts: 320
Joined: Fri May 27, 2011 8:23 pm
Contact:

Re: How do I make an Independent Side-Image for One Characte

#6 Post by AERenoir »

Ooh, so all i need to do is say that it's a side image and Ren'py will automatically put it on the side?

Post Reply

Who is online

Users browsing this forum: No registered users