Main character side 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
User avatar
emmeeeh
Newbie
Posts: 2
Joined: Sat Apr 15, 2017 6:33 am
Tumblr: whereskymeetsland
Deviantart: emmeeeh
Contact:

Main character side images

#1 Post by emmeeeh »

I am new to ren'py and I'm working on a free otome game all by myself and I would very much appreciate any help -- my problem is, I want to make it so when the heroine is speaking it shows a side image on the textbox - which I've looked up and seen the code for this but every single code I've used so far either doesn't work for me or has me writing

Code: Select all

define mc = character (...)
for each expression which changes the heroine's name (i want to leave the name customizable, aka for the player to decide) and I don't know where to look for an answer.

Does anyone have any clue on how to achieve the side images without modifying the character's name?

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Main character side images

#2 Post by Divona »

Did you look up Ren'Py documentation on Side Image?

For the character name, if I understand it correctly, you want a player to be able to enter the name themselves? You can set a variable for a character name and use that. Character name and a name tag for a character is a complete different thing.

Code: Select all

default mc_name = " "

define mc = Character("[mc_name]", image="main_character")

image main_character neutral = "mc_neutral.png"
image main_character smile = "mc_smile.png"

image side main_character neutral = "mc_side_neutral.png"
image side main_character smile = "mc_side_smile.png"

label start:

    show main_character neutral

    python:
        mc_name = renpy.input("What is my name?")
        mc_name = povname.strip()

    mc smile "Oh right! My name is [mc_name]!"
    mc neutral "How did I forget that?"

    return
Completed:
Image

User avatar
emmeeeh
Newbie
Posts: 2
Joined: Sat Apr 15, 2017 6:33 am
Tumblr: whereskymeetsland
Deviantart: emmeeeh
Contact:

Re: Main character side images

#3 Post by emmeeeh »

Divona wrote:Did you look up Ren'Py documentation on Side Image?

For the character name, if I understand it correctly, you want a player to be able to enter the name themselves? You can set a variable for a character name and use that. Character name and a name tag for a character is a complete different thing.

Code: Select all

default mc_name = " "

define mc = Character("[mc_name]", image="main_character")

image main_character neutral = "mc_neutral.png"
image main_character smile = "mc_smile.png"

image side main_character neutral = "mc_side_neutral.png"
image side main_character smile = "mc_side_smile.png"

label start:

    show main_character neutral

    python:
        mc_name = renpy.input("What is my name?")
        mc_name = povname.strip()

    mc smile "Oh right! My name is [mc_name]!"
    mc neutral "How did I forget that?"

    return
Ahhh, bless you! I don't exactly know what I did but I managed to make it work!
Image
Thank you so much!

Post Reply

Who is online

Users browsing this forum: Bing [Bot]