MZ Trigger event if picture is hovering over it

Hi all, almost similar to the change mouse cursor when hover over event plugins.

This is as easy as I can put it, please help 😢.

-Trigger an event if a picture is hovering over that event. No matter how far away the event is, it should still be triggered if it is touched by Picture 1 for example.

As you can see, in my project below, the white "Target" mark in the middle is where the weapon is pointing, however, right now, that white mark is only a picture and has no function. Please help?
2022-11-01.png
Have you tried converting the screen coordinates of the picture to map coordinates, and then checking those against the event's coordinates? I've figured out how to do such a thing for a plugin I was working on for myself a while ago, meant to check if an event has been clicked on. It includes range options (square for tile-based maps or ellipses for pixel-movement maps) so the origin of the click doesn't have to be on the exact pixel of the event's origin. I'm sure I could easily repurpose the logic to check a picture's screen location instead of a mouse click, to help you out if you need it.

EDIT: Just realized this question is for MZ. The plugin I made is for MV, and it's pretty involved so I'd be shocked if it ported over nicely, but I could still walk you through the logic if you need help 🙂
Thank you for replying to this post @Ratatattat, in fact that’s exactly what I was thinking of while I was at work, I’ve created so much with just events. I’m not a big fan of plugins if I can use events buuuuuuuut, since the events are in a 3 dimensional space and the show picture is strapped in a 2 Dimensional space, a space that has no depth, the coordinates will not match is what I thought to my self. The picture will remain in the middle of the screen even if the player looks up into the sky or down to the grass. Let’s assume that the coordinates of the picture are 150x 100y. Let’s say that the coordinates of the event on the 3D plain are also 150x 100y but the player is looking into the sky (not targeting the enemy). It would be sad if the poor zombie was shot by let’s say…. Falling bullets… LOL. I am open to more solutions though. Ideally, I would like something like the plugins that feature the mouse being able to click on the event even if the player is not next to the event because they don’t use coordinates on the mouse to change the mouse to a different icon when they are hovering over the event. I am hoping for to have my picture 1 do the same thing as the mouse. To click on events even if they are not next to the character without coordinates since of course since my pictures are stuck in the 2D space coordinates. Can you show the game you worked on? Is it public?
since the events are in a 3 dimensional space and the show picture is strapped in a 2 Dimensional space, a space that has no depth, the coordinates will not match
Hmm... yeah, I can't help much more without knowing exactly how the 3D space/coordinates work!

Can you show the game you worked on? Is it public?
Ah, no, I'm still working on it 🙂 It's 2D though.
Hmm... yeah, I can't help much more without knowing exactly how the 3D space/coordinates work!


Ah, no, I'm still working on it 🙂 It's 2D though.
I’ll take any help and all the brains that are willing to help!!! I’ll attach a picture to demostrarte.
BF8DA97B-C3E3-47C5-877E-9AFE18638F53.jpeg

In this example, the coordinates of the picture and the event are the same in 2D and so I would be able to make the picture hovering over the event work as intended. In 3D the coordinates and the picture are also the same but the picture is not hovering over the event because the event is not inside the 2D screen where the picture is located. The camera can also be moved around and this means that even though you are not targeting the zombie if you are looking up into the sky or down into the grass and the coordinates with the picture and zombie match then the zombie will get struck without aiming at him.
Hmmmmmmmmm

In 3D the coordinates and the picture are also the same but the picture is not hovering over the event because the event is not inside the 2D screen where the picture is located.
So are there two separate planes for these coordinates, where the picture's coordinates are based on the plane parallel with the screen, whereas the event's coordinates are based on the plane parallel to the "ground"? (I've never dabbled in making 3D games with RM, so I've literally got no clue how this works 😛)

Instead of converting the picture's screen coordinates to tile coordinates, is there any way to find the screen coordinates of the event? Or would these be messed up too because of the tile coordinates being done differently?
———————————————————-
Instead of converting the picture's screen coordinates to tile coordinates, is there any way to find the screen coordinates of the event? Or would these be messed up too because of the tile coordinates being done differently
———————————————————-

The screen coordinates of the event would be the BEST possible way to get this to work but, here I am, also trying to figure out how to do that LOL. The mouse seems to work well this way and doesn’t care if something is 2D or 3D. It clicks on what ever is on the screen but I would like a picture to have that same effect. After I place the picture in the middle.

Edit: you just gave me an idea. I think MZ let’s you do screen coordinates. Let me try!

Edit 2: You helped me discover Screen Coordinates! Thank you!!! It's unfortunatel that I don't think I'm going to get a plugin out of this but I think using Screen Coordinates will most definitely work, I'll keep everyone updated. Thank you @Ratatattat!! 🙂

———————————————————-
Instead of converting the picture's screen coordinates to tile coordinates, is there any way to find the screen coordinates of the event? Or would these be messed up too because of the tile coordinates being done differently
———————————————————-

The screen coordinates of the event would be the BEST possible way to get this to work but, here I am, also trying to figure out how to do that LOL. The mouse seems to work well this way and doesn’t care if something is 2D or 3D. It clicks on what ever is on the screen but I would like a picture to have that same effect. After I place the picture in the middle.

Edit: you just gave me an idea. I think MZ let’s you do screen coordinates. Let me try!

Edit 2: You helped me discover Screen Coordinates! Thank you!!! It's unfortunatel that I don't think I'm going to get a plugin out of this but I think using Screen Coordinates will most definitely work, I'll keep everyone updated. Thank you @Ratatattat!! 🙂

Yay, I'm glad you figured something out! ^^ Did it end up working?
Did test out the concept with placeholder eventing for screen coordinates and it did work! I am working on a dungeon right now and a cutscene but then I can post a video of this mini game in action 🙂.
So, now that everything is working as intended I can post it here as I said I would. for anyone who is interested is the picture triggering an event if it hovers over here I used variables and events only.

Original thread: https://forums.rpgmakerweb.com/threads/trigger-event-if-picture-is-hovering-over-it.152409/