[SOLVED] How can I use x and y coordinates to display an image?

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
felsenstern
Regular
Posts: 62
Joined: Tue Jul 11, 2017 2:13 am
Contact:

[SOLVED] How can I use x and y coordinates to display an image?

#1 Post by felsenstern » Tue Jun 29, 2021 6:32 am

Hiya,

I want to use coordinates in combination with 'show image' and 'scene' command. How can I do that?
Last edited by felsenstern on Tue Jun 29, 2021 7:16 am, edited 1 time in total.
---
Yes, I've Read The F*cking Manual
Yes, I've used the f*cking search function
Yes, I've used a site search
No, I don't need a reminder that search functions exist
No, I don't need your astonished outbreak that I couldn't find the information
No, I don't need your answer if you can't just give it without all the BS around it

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

Re: How can I use x and y coordinates to display an image?

#2 Post by Alex » Tue Jun 29, 2021 6:47 am

Try it like

Code: Select all

transform my_pos_transform(x,y):
    anchor (0.0, 0.0) # tip left corner of an image
    pos (x, y)

label start:
    show eileen at my_pos_transform(150, 50)
    "?!"
https://www.renpy.org/doc/html/atl.html

felsenstern
Regular
Posts: 62
Joined: Tue Jul 11, 2017 2:13 am
Contact:

Re: How can I use x and y coordinates to display an image?

#3 Post by felsenstern » Tue Jun 29, 2021 7:08 am

Hmm... it seems that using float values for coordinates is causing the problem for me. Thanks a lot for the answer.
---
Yes, I've Read The F*cking Manual
Yes, I've used the f*cking search function
Yes, I've used a site search
No, I don't need a reminder that search functions exist
No, I don't need your astonished outbreak that I couldn't find the information
No, I don't need your answer if you can't just give it without all the BS around it

Post Reply

Who is online

Users browsing this forum: No registered users