What pixel am I hitting?
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.
What pixel am I hitting?
So, I'm trying to figure out a way to figure out where the player is clicking on the screen. I'm aware of renpy.imagemap, but I would like to avoid defining 800 x 600 hotspots or so. Since renpy.imagemap works at all I can only assume that the program knows where the user is clicking. Is there a way to hijack those results and just save it into variables?
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: What pixel am I hitting?
You need to create a user-defined displayable to do this. Ren'Py is set up so that all games can be played with a keyboard or joystick, so it's not always the case that there even _is_ a particular point where the used clicked to activate a button.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: What pixel am I hitting?
I'm confused. Could you elaborate a little on how I should/could go about it?
Edit: Just tell me to hit the books, If it's overly complicated.
Edit: Just tell me to hit the books, If it's overly complicated.
Re: What pixel am I hitting?
Except not much has been written anywhere about making your own displayables.Mochiron wrote:I'm confused. Could you elaborate a little on how I should/could go about it?
Edit: Just tell me to hit the books, If it's overly complicated.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: What pixel am I hitting?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Bing [Bot]