Pictures not showing up?

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
xCephalopod
Newbie
Posts: 15
Joined: Fri Oct 24, 2014 3:11 pm
Projects: Bellmare Romance
Tumblr: brittleskies
Skype: xCephalopod
Location: Millersburg, Michigan
Contact:

Pictures not showing up?

#1 Post by xCephalopod » Fri Oct 31, 2014 9:14 pm

I followed the script instructions to show my protag sprite on the side of the text box, but she's not showing up. If I put her at left, a grey box takes over the bg, and says the image name at the top. I don't know what I'm doing wrong?

Code: Select all

    init:
        $ offScreen = Position(xpos=1, xanchor='left', ypos=0)
        
    show bakery bg
    
    show evita 1 at offScreen
Attachments
ex 2.jpg
When using at left
ex 1.jpg
When using at offScreen

User avatar
Milkymalk
Miko-Class Veteran
Posts: 752
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Pictures not showing up?

#2 Post by Milkymalk » Fri Oct 31, 2014 9:28 pm

You place a sprite offscreen and wonder why it's not showing up? "Offscreen" means "not on the screen". Remember that y=0 is on top. If ypos=0 and yanchor=1.0 then the sprite is just off the top of your screen.

Why xpos=1? Is there a reason you need that one pixel?

Code: Select all

    init:
        $ offScreen = Position(xpos=1, xanchor='left', ypos=0) # this IS offscreen depending on the yanchor!
       
    scene bg bakery # use this to set the bg for your scene! it wipes the canvas and removes any other bg
   
    show evita 1 at left # this shows the character at left!
That "1" in the last line is confusing me and probably part of your problem, I don't know if tags are allowed to start with a number.

I'm kinda guessing here because you didn't give really much information.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

User avatar
xCephalopod
Newbie
Posts: 15
Joined: Fri Oct 24, 2014 3:11 pm
Projects: Bellmare Romance
Tumblr: brittleskies
Skype: xCephalopod
Location: Millersburg, Michigan
Contact:

Re: Pictures not showing up?

#3 Post by xCephalopod » Fri Oct 31, 2014 10:41 pm

I was looking at a different thread, and that's the code it said to put in for it to show on the side. :c I don't know anything about coding, and I just followed the thing on the other thread.

Code: Select all

init:
    $ offScreen = Position(xpos=1, xanchor='left', ypos=0)
...
show jinko 01 at offScreen
??

User avatar
Milkymalk
Miko-Class Veteran
Posts: 752
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Pictures not showing up?

#4 Post by Milkymalk » Fri Oct 31, 2014 11:25 pm

I see, now that I read the thread where you got this.
Did you declare your images? Both the normal and the side image?
I don't know anything about coding, and I just followed the thing on the other thread.
Don't take this personally, but this here is the real problem.
You don't need to know coding if all you want to do is have sprites appear at left, center and right in front of a background and have a few menus. But as soon as you customize as much as trying to have a side image, you should at least understand what the code you copy does. You will never ever find code that does exactly what you want exactly how you want it. There will always be the need to customize it to your needs, and may it only be a number that you have to change.

If you show me your image declaration part I might be able to help you, but be warned that without understanding what you are doing you will have to ask for help every 10 minutes :-(
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

User avatar
xCephalopod
Newbie
Posts: 15
Joined: Fri Oct 24, 2014 3:11 pm
Projects: Bellmare Romance
Tumblr: brittleskies
Skype: xCephalopod
Location: Millersburg, Michigan
Contact:

Re: Pictures not showing up?

#5 Post by xCephalopod » Sat Nov 01, 2014 12:49 am

I mean, this is the first time I've ever tried doing anything like this, so I don't really know how I'd know code. I've kind of have the understanding of a lot of it from tutorials or the forums here, but I'm just having some trouble with a couple things. :c

I appreciate the help, though. Thank you.

This is my image declaration part:

Code: Select all

# Declare images below this line, using the image statement.
#Backgrounds
image bakery bg = "bakery-bg.png"
image pub bg = "bar-bg.jpg"
image town square bg = "townsquare-bg.jpg"

#Characters
image Evita 1 = "evita 1.jpg"

# Declare characters used by this game.
define e = Character('Evita', color="#570F74")
define d = Character('Dmitry', color="#990505")
define l = Character('Lir', color="#08650A")
define r = Character('Ravi', color="#076495")
define m = Character('Marija', color="#D04594")
define p = Character('Pearl', color="#E42C42")
define a = Character('Alorra', color="#C96A0B")

User avatar
Milkymalk
Miko-Class Veteran
Posts: 752
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Pictures not showing up?

#6 Post by Milkymalk » Sat Nov 01, 2014 10:07 am

You haven't declared any side images, so of course nothing shows up ;-)
This is the thread you were copying from, you can see how it's done there:
http://lemmasoft.renai.us/forums/viewto ... =8&t=17950
You also need image="Evita" and so on inside the Character declaration. It defines the side image for that character.
So try:

Code: Select all

init:
    $ offScreen = Position(xpos=1, xanchor='left', ypos=0)  # unneeded normal image is shown offscreen

#Characters
image Evita 1 = "evita 1.jpg"         # so you don't get a "sprite missing" message
image side Evita 1 = "evita 1.jpg" # this is what gets shown as side image

# Declare characters used by this game.
define e = Character('Evita', color="#570F74", side="Evita")       # note the "side=" part

label start:
    show e 1 at offScreen   # e is defined as Evita, so you don't need to write the name out
In fact, you have to use the defined character name "e" or the side image won't show up.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

User avatar
xCephalopod
Newbie
Posts: 15
Joined: Fri Oct 24, 2014 3:11 pm
Projects: Bellmare Romance
Tumblr: brittleskies
Skype: xCephalopod
Location: Millersburg, Michigan
Contact:

Re: Pictures not showing up?

#7 Post by xCephalopod » Mon Nov 03, 2014 3:37 pm

Okay! So, I followed your code, and she shows up now!

But, she is showing up in the middle instead of the side. :c Also, she's not transparent anymore, but I think that's because I saved her under .jpg and not .png? I'm not sure.

Code: Select all

  init:
        $ offScreen = Position(xpos=1, xanchor='left', ypos=0)
        
    show bakery bg
    
    show e 1 at offScreen
    
    show Evita 1
Attachments
Untitled.png

User avatar
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

Re: Pictures not showing up?

#8 Post by meiri » Mon Nov 03, 2014 6:06 pm

Yes, because your image is saved as jpg it is not transparent.
Also, you say that you want your image on the "side" ... By "side" do you mean on top of or behind the textbox?
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

User avatar
xCephalopod
Newbie
Posts: 15
Joined: Fri Oct 24, 2014 3:11 pm
Projects: Bellmare Romance
Tumblr: brittleskies
Skype: xCephalopod
Location: Millersburg, Michigan
Contact:

Re: Pictures not showing up?

#9 Post by xCephalopod » Tue Nov 04, 2014 4:19 pm

Okay. I'll have to resave her. :p Good thing I kept the non-picture document. c: Thanks!

I want her in front of the textbox on the side. o:

User avatar
xCephalopod
Newbie
Posts: 15
Joined: Fri Oct 24, 2014 3:11 pm
Projects: Bellmare Romance
Tumblr: brittleskies
Skype: xCephalopod
Location: Millersburg, Michigan
Contact:

Re: Pictures not showing up?

#10 Post by xCephalopod » Tue Nov 04, 2014 4:51 pm

I figured it out! :D Thank you all for the help!
Attachments
Untitled.png

Post Reply

Who is online

Users browsing this forum: No registered users