Side image with Conditional Switch?

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
cmk_
Newbie
Posts: 16
Joined: Fri Dec 11, 2020 11:03 am
Tumblr: crowneavn
Contact:

Side image with Conditional Switch?

#1 Post by cmk_ »

In the renpy documentation, they said define e = Character("Eileen", image="eileen")
For mine, there is no precise name since I want to give an option of choosing names
also i have a choice between two protagonist, boy or a girl.
So currently my script is :

define name = Character("[name]")
image me_neutral= ConditionSwitch(
"me == 'maingirl'", "MainGirl_Neutral.png",
"me == 'mainboy'", "MainBoy_Neutral.png",
)
label start:
menu:
"I am a"
"Girl":
$ me = 'maingirl'
"Boy":
$ me = 'mainboy'
label name:
$ name = renpy.input("My name is-")
$ name = name.strip()
if name == "":

So the problem I have is, how do I make a side image with these factors? Currently the textbox overlaps the character image so I'm stuck TT.
Any help is appreciated!

User avatar
Triority
Regular
Posts: 185
Joined: Fri Jul 20, 2018 1:28 pm
Completed: Welcome To... Chichester 0, 1,2 OVN 1, OVN 2, OVN 3, No Regrets For The Future
Projects: Welcome To... Chichester series
Organization: Triority
Tumblr: Sku-te
itch: triority
Location: England
Discord: sku_te
Contact:

Re: Side image with Conditional Switch?

#2 Post by Triority »

I used something like :

Code: Select all

    image side virus worried=ConditionSwitch(
        "virusUsingKnife==True",characterPath+"young_grendelB12_small"+GFX_EXT,
        "virusUsingKnife==False",characterPath+"young_grendel12_small"+GFX_EXT)

cmk_
Newbie
Posts: 16
Joined: Fri Dec 11, 2020 11:03 am
Tumblr: crowneavn
Contact:

Re: Side image with Conditional Switch?

#3 Post by cmk_ »

Oh thanks for the help! I'm going to try it out!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]