Game doesn't launch when I define the image like that?

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
Nanahs
Veteran
Posts: 297
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Game doesn't launch when I define the image like that?

#1 Post by Nanahs » Mon Jan 07, 2019 7:30 pm

I have some images that are really big. And I need to resize them on the game itself.

So I tried:

Code: Select all

label start:

    image sunnypark1:
        "places/sunnypark1.png"
        pos (130,490) 
        zoom .3
    
    scene park
    show screen sunshine
    show image "sunnypark1"
I need to set the position and the "zoom .3" to make it smaller.

But when I use this code the game doesn't even launch.

If I delete the "image sunnypark" I defined, the game launches normally.

Where the problem is?

Thanks.

User avatar
mitoky
Veteran
Posts: 316
Joined: Sat Feb 07, 2015 9:12 pm
Projects: The Purring Demon's Love, circus eterie
Contact:

Re: Game doesn't launch when I define the image like that?

#2 Post by mitoky » Mon Jan 07, 2019 7:51 pm

Things should be defined outside of labels:

Code: Select all

image sunnypark1:
    "places/sunnypark1.png"
    pos (130,490) 
    zoom .3

label start:
    scene park
    show screen sunshine
    show sunnypark1
Also only show things by the names defined, hence only "show sunnypark1"

User avatar
Nanahs
Veteran
Posts: 297
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Re: Game doesn't launch when I define the image like that?

#3 Post by Nanahs » Tue Jan 08, 2019 7:28 pm

mitoky wrote:
Mon Jan 07, 2019 7:51 pm
Things should be defined outside of labels:

Code: Select all

image sunnypark1:
    "places/sunnypark1.png"
    pos (130,490) 
    zoom .3

label start:
    scene park
    show screen sunshine
    show sunnypark1
Also only show things by the names defined, hence only "show sunnypark1"
Thank you so much! :)

Post Reply

Who is online

Users browsing this forum: No registered users