Pictures aren't working

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
PervertPrince
Regular
Posts: 56
Joined: Sun Aug 22, 2010 7:17 pm
Location: South Africa
Contact:

Pictures aren't working

#1 Post by PervertPrince » Sun Aug 22, 2010 7:31 pm

I've recently downloaded the Ren'Py programme and am able to do dialogue just fine but when it comes to images nothing happens. Whenever I put an image in the script and try to launch it, it always says Undefined Images. Can anyone help me?

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

Re: Pictures aren't working

#2 Post by Alex » Mon Aug 23, 2010 2:26 am

Have you already read this? http://www.renpy.org/wiki/renpy/doc/tut ... Quickstart
Also, you can find useful information in other peoples posts (like http://lemmasoft.renai.us/forums/viewto ... f=8&t=7852)
And a little advice - post a part of your code that doesn't work and error message (if you get some), that will help people to better understand your problem and find the solution.

User avatar
PervertPrince
Regular
Posts: 56
Joined: Sun Aug 22, 2010 7:17 pm
Location: South Africa
Contact:

Re: Pictures aren't working

#3 Post by PervertPrince » Mon Aug 23, 2010 10:55 am

This is how I have it down as exactly. I honestly have no idea what's wrong. I'll still carry on looking at those links though to see if my answer is there. Thanks for the help.

# You can place the script of your game in this file.

init:
# Declare images below this line, using the image statement.
image bg Forest = 'Forest.jpg'

# Declare characters used by this game.
$ c = Character('Chris', color="#c8ffc8")


# The game starts here.
label start:

scene bg Forest
with fade

c 'Zzzzzzz'

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

Re: Pictures aren't working

#4 Post by Alex » Mon Aug 23, 2010 1:04 pm

Well, if you properly indent all the stuff... check the real filename on your hard-drive.
When you declare images, filenames should be exactly the same ('Forest.jpg' is not the same as 'forest.JPG' and, of course, not the 'Forest.png')
Next thing,

Code: Select all

image bg Forest = 'Forest.jpg'
searches for file in "*your_project_folder*/game", if you have special folder for images inside that folder, then you should specify the path to the file from "*your_project_folder*/game". For example, if you have "img" folder, then it would be like

Code: Select all

image bg Forest = 'img/Forest.jpg'
P.S. if you want to post some code, there is a button named "Code", just click it, and place your code between

Code: Select all

 and [/code ] tags - it would be easy to read your code.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], _ticlock_