Character Side Image Variable

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
Nekker
Newbie
Posts: 3
Joined: Tue May 09, 2017 1:12 pm
Contact:

Character Side Image Variable

#1 Post by Nekker »

Hi, I'm sorry if this question was already asked before, but I couldn't find a thread for this situation.

I want to use a variable to show off the current side side image of a character with his currently worn clothes.

Like:
$ mike_clothes = normal

Code: Select all

mike [mike_clothes]  "I'm wearing my [mike_clothes] outfit."

The clothes are defined like:
image side mike_image normal = "...."
image side mike_image suave = "...."
What do I need to do at "mike [mike_clothes]" to make this work?

Thank you very much.

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Character Side Image Variable

#2 Post by Scribbles »

Nekker wrote:Hi, I'm sorry if this question was already asked before, but I couldn't find a thread for this situation.

I want to use a variable to show off the current side side image of a character with his currently worn clothes.

Like:
$ mike_clothes = normal

Code: Select all

mike [mike_clothes]  "I'm wearing my [mike_clothes] outfit."

The clothes are defined like:
image side mike_image normal = "...."
image side mike_image suave = "...."
What do I need to do at "mike [mike_clothes]" to make this work?

Thank you very much.
if you create it as a condition switch, you can just do:

Code: Select all

$ mike_clothes = normal
mike "I'm wearing normal clothes now."
$ mike_clothes = fancy
mike "Now I'm wearing fancy clothes"
the documentation is here:
https://www.renpy.org/doc/html/displaya ... splayables

hope that helps!
Image - Image -Image

Nekker
Newbie
Posts: 3
Joined: Tue May 09, 2017 1:12 pm
Contact:

Re: Character Side Image Variable

#3 Post by Nekker »

Thank you very much!
Had to try around how to do this, but I finally got it :)

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Character Side Image Variable

#4 Post by Scribbles »

Nekker wrote:Thank you very much!
Had to try around how to do this, but I finally got it :)
I'm glad i could help ^^
Image - Image -Image

Post Reply

Who is online

Users browsing this forum: bonnie_641, Google [Bot]