[Solved] Image position on this case?

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
nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

[Solved] Image position on this case?

#1 Post by nanashine »

I'm using a puzzle code. And then there's this part:

Code: Select all

label start:
    scene puzzles
    image whole = "puzzleone.jpg"
    python:
        coorlistx = [200, 320, 440, 560]
        coorlisty = [110, 317, 524]
        piecelist = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
        for i in range(12):
            x = renpy.random.randint(0, 200) + 200
            y = renpy.random.randint(0, 480) + 600
            piecelist[i] = [x,y]
        movedpiece = 0
        movedplace = [0, 0]
    jump puzzle
    
label win:
    scene puzzles
    show whole 
    "you win"
    menu:
        "Play again?"
        
        "yes":
            jump start
            
        "no":
            return
When the person wins, it goes like " show whole" to show the puzzle picture.
The problem is that the image appears at them bottom of the screen. I wanted it to show at an specific position.
I tried instead of show "image whole", showing the image "puzzle". And it gave me the infinite loop error.

So what would be the correct form of defining the position for the image to appear? It keeps giving me error messages :lol:
I need it to show up at an speficic place "pos (_,_)", because of the background image.

Thanks.
Last edited by nanashine on Thu Mar 21, 2019 7:45 pm, edited 1 time in total.
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Image position on this case?

#2 Post by Per K Grok »

nanashine wrote: Thu Mar 21, 2019 6:05 pm
----

So what would be the correct form of defining the position for the image to appear? It keeps giving me error messages :lol:
I need it to show up at an speficic place "pos (_,_)", because of the background image.

Thanks.
Try

Code: Select all

    show whole:
        pos (100, 100) 

nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Re: Image position on this case?

#3 Post by nanashine »

Per K Grok wrote: Thu Mar 21, 2019 6:18 pm
nanashine wrote: Thu Mar 21, 2019 6:05 pm
----

So what would be the correct form of defining the position for the image to appear? It keeps giving me error messages :lol:
I need it to show up at an speficic place "pos (_,_)", because of the background image.

Thanks.
Try

Code: Select all

    show whole:
        pos (100, 100) 
Thank you so much!
I tried this before but it gave me an error messae. Maybe I didn't put it in the right position.
But now it worked. Thanks :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

Post Reply

Who is online

Users browsing this forum: No registered users