[SOLVED]Finding X and Y Coordinates
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.
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.
[SOLVED]Finding X and Y Coordinates
Another beginner question: what the easiest way to find X and Y coordinates in a an existing scene?
Last edited by galadain on Thu Oct 01, 2020 10:16 am, edited 1 time in total.
Re: Finding X and Y Coordinates
I do it like that:
You start your game> shift + d> image location picker> search your image
sample: https://youtu.be/L9Vt7fcwkXk?t=513
You start your game> shift + d> image location picker> search your image
sample: https://youtu.be/L9Vt7fcwkXk?t=513
Re: Finding X and Y Coordinates
I use this
You need to show devtool_mousepos screen at start of game. Then press `(button below esc) to show/hide current mouse pos.
Code: Select all
default show_mouse_pos_info=False
init python:
class DevtoolMouseposDisplayable(renpy.Displayable):
def render(self,width,height,st,at):
tr=Text("{}x{}".format(*renpy.get_mouse_pos()),color="#F00",font="DejaVuSans.ttf").render(width,height,st,at)
bgr=Solid("#0004").render(max(160,tr.width+32),max(64,tr.height+32),st,at)
rv=renpy.Render(bgr.width,bgr.height)
rv.blit(bgr,(0,0))
rv.blit(tr,((bgr.width-tr.width)//2,(bgr.height-tr.height)//2))
renpy.redraw(self,0)
return rv
screen devtool_mousepos():
zorder 9999
key '`' action ToggleVariable("show_mouse_pos_info")
if show_mouse_pos_info:
add DevtoolMouseposDisplayable()
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350
Re: Finding X and Y Coordinates
Thanks everyone. This worked.
How do I mark this as "solved"?
How do I mark this as "solved"?
- 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: Finding X and Y Coordinates
In your first post in the thread you click on the pencil-icon ("Edit post"). It is in the top-right corner.
In the window that opens you have a field for "Subject". That is the title of the thread. Add "[SOLVED]" to the text in that field and press the submit button below the area for the main text of the post.
Who is online
Users browsing this forum: SypherZent