Side image with custom name?

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
Kokoro Hane
Eileen-Class Veteran
Posts: 1241
Joined: Thu Oct 27, 2011 6:51 pm
Completed: 30 Kilowatt Hours Left, The Only One Girl { First Quarter }, An Encounter ~In The Rain~, A Piece of Sweetness, Since When Did I Have a Combat Butler?!, Piece by Piece, +many more
Projects: Fateful Encounter, Operation: Magic Hero
Organization: Tofu Sheets Visual
Deviantart: kokoro-hane
itch: tofu-sheets-visual
Contact:

Side image with custom name?

#1 Post by Kokoro Hane »

With renpy.input, you have a variable which will display the name the user types in (typically I use "pov" as the variable, since that was in the tutorial). However, if I want the MC's sideimage to appear as well in the textbox, how do you define that with a custom name input? I can do both separately, but could never figure out how to have a character side image and a custom input name. Thanks in advanced!
PROJECTS:
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]

But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"

User avatar
Alex
Lemma-Class Veteran
Posts: 3098
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Side image with custom name?

#2 Post by Alex »

You can modify the choice screen to show a side image

Code: Select all

screen input:

    # If there's a side image, display it above the text.
    if my_side_image:
        
        window style "input_window":
            has vbox
            xpos 210

            text prompt style "input_prompt"
            input id "input" style "input_text"
        
        add my_side_image xalign 0.0 yalign 0.95
        
    else:
        window style "input_window":
            has vbox

            text prompt style "input_prompt"
            input id "input" style "input_text"
        
    use quick_menu


label start:
    
    $ my_side_image = None
    "..."
    $ x = renpy.input(prompt="???")
    "..."
    $ my_side_image = "side e"
    $ x = renpy.input(prompt="???")
    "..."

TadaChi
Newbie
Posts: 1
Joined: Thu Aug 15, 2013 10:59 am
Contact:

Re: Side image with custom name?

#3 Post by TadaChi »

I'm having the same problem... I can't seem to get that code Alex posted to work in my favor.

User avatar
Alex
Lemma-Class Veteran
Posts: 3098
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Side image with custom name?

#4 Post by Alex »

To make it work you need to replace the default code for input screen in screens.rpy with code above.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]