Page 1 of 1

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

Posted: Mon Jan 07, 2019 7:30 pm
by Nanahs
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.

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

Posted: Mon Jan 07, 2019 7:51 pm
by mitoky
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"

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

Posted: Tue Jan 08, 2019 7:28 pm
by Nanahs
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! :)