Multiple Undefined Image(s) . . help please? {SOLVED}

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
xSamChan
Regular
Posts: 33
Joined: Sun Dec 11, 2011 9:06 pm
Contact:

Multiple Undefined Image(s) . . help please? {SOLVED}

#1 Post by xSamChan »

Err. . before I start let me make one thing clear:
I'm a stupid noob. I just started using Ren'py today and everything was a breeze until now D: . .
I'm trying to make an otome game/visual novel, and I was just testing everything before I actually started the actual script. . .

So I've been spending a few hours trying to figure out exactly what I did wrong for side images. .
here's the coding so far. .

Code: Select all

define p = Character("Player", image="player")

image side player xhappy = "plxhappy.png" 
image side player happy ="plhappy.png"
image side player con = "plcon.png"
image side player worried = "plworried.png"
image side player sad = "plsad.png"


 # The game starts here.
label start:

    p xhappy "Testing xhappy"
    
    p happy "Testing happy"
    
    p con "Testing con"
    
    p worried "Testing worried."
    
    p sad "Testing sad"
Simple, right?

But what it does when I launch the game to see how it works so far, It will only show the images for p xhappy, and p happy. Though, when it gets to "p happy" it gives me the message on the top of the screen, "Undefined Images player happy".
After that, it refuses to show any of the other side images, and it gives me the same message on the top of the screen, "Undefined Images player con" "Undefined Images player worried" . . .etc


I just don't understand whats wrong ;A; . .
I double checked to make sure I didn't miss-spell the image names, and I also made sure they were put into the right folder. . I mean everything looks good on the surface but when it comes to testing everything goes downhill :C

I looked around at some other forum subjects in relation to mine, but none seemed to solve my problem . .
;n; i'm at this point where i'm just about to give up on side images. . .

So, help me? Please? :'D. .
Last edited by xSamChan on Wed Dec 14, 2011 4:42 pm, edited 1 time in total.

KimiYoriBaka
Miko-Class Veteran
Posts: 636
Joined: Thu May 14, 2009 8:15 pm
Projects: Castle of Arhannia
Contact:

Re: Multiple Undefined Image(s) . . help please?

#2 Post by KimiYoriBaka »

try this:

Code: Select all

label start:
    show eileen happy

    p xhappy "Testing xhappy"
   
    p happy "Testing happy"
   
    p con "Testing con"
   
    p worried "Testing worried."
   
    p sad "Testing sad"

User avatar
Stripe
Regular
Posts: 136
Joined: Mon Nov 02, 2009 12:05 pm
Projects: secret!
Location: England
Contact:

Re: Multiple Undefined Image(s) . . help please?

#3 Post by Stripe »

image side player happy ="plhappy.png"

Not sure if this will make a difference, but you're missing a space after the equals sign here~

xSamChan
Regular
Posts: 33
Joined: Sun Dec 11, 2011 9:06 pm
Contact:

Re: Multiple Undefined Image(s) . . help please?

#4 Post by xSamChan »

KimiYoriBaka wrote:try this:

Code: Select all

label start:
    show eileen happy

    p xhappy "Testing xhappy"
   
    p happy "Testing happy"
   
    p con "Testing con"
   
    p worried "Testing worried."
   
    p sad "Testing sad"
D: did you mean show player happy?
Even so, it didn't work .. thanks for trying though ;u;

xSamChan
Regular
Posts: 33
Joined: Sun Dec 11, 2011 9:06 pm
Contact:

Re: Multiple Undefined Image(s) . . help please?

#5 Post by xSamChan »

Ris wrote:image side player happy ="plhappy.png"

Not sure if this will make a difference, but you're missing a space after the equals sign here~
Ah ^^, thanks for pointing that out. . regardless of the error . . nothing changed :C . .

Rewritten Ennui
Veteran
Posts: 279
Joined: Thu Jul 14, 2011 1:50 pm
Organization: TwinTurtle Games
Contact:

Re: Multiple Undefined Image(s) . . help please?

#6 Post by Rewritten Ennui »

xSamChan wrote: So I've been spending a few hours trying to figure out exactly what I did wrong for side images.
I could struggle with what you're trying to code, or I can share with you my way of making side images work. I'll demonstrate my method since I think it's a bit less messy.

Code: Select all

define p = Character('What's-your-face',
                 color="#4169E1",
                 window_left_padding=160, #feel free to change this number as you please to fit your needs
                 show_side_image=ConditionSwitch(
                 "express == 'xhappy'", "plxhappy.png",
                 "express == 'happy'", "plhappy.png",
                 "express == 'con'", "plcon.png",
                 "express == 'worried'", "plworried.png",
                 "express == 'sad'", "plsad.png", xalign=0.0, yalign=1.0, #feel free to change this number too
        )
    )

label start:

 $ express = "xhappy"
 p"Testing xhappy"
 $ express = "happy"
 p"Testing happy"
 $ express = "con"
 p"Testing con"
 $ express = "worried"
 p"Testing worried."
 $ express = "sad"
 p"Testing sad"
You see, now you only need one define statement for one character. To change the expression, you simply use $ express = and whatever that expression is. Hopefully this helps.
I've swapped accounts to CheeryMoya, so this account is no longer in use. Refer to the new account if you want to contact me.

Twinturtle Games Website

xSamChan
Regular
Posts: 33
Joined: Sun Dec 11, 2011 9:06 pm
Contact:

Re: Multiple Undefined Image(s) . . help please?

#7 Post by xSamChan »

@Rewritten Ennui
AAAHHH, YOU'RE BRILLIANT :'D!!
>u< thank you so much!!
That worked :'D
^^ i'm totally happy nowww thank youu again :'D!

Post Reply

Who is online

Users browsing this forum: Ocelot