Given a location, check if there exists an event (maybe return the event ID)?

I am wondering if there is a way to check whether there exists an event on a given location using script.

Say I want to check whether there exists an event on (7, 9), is there any way I could do this?

Maybe a script call that returns the event ID on that specific location would be great!
get location info

that event command returns the event ID if there is an event on the position or zero if there is no event

no need for a script at all, although you can look up the list for the script equivalents of event commands if you really need it as script
get location info

that event command returns the event ID if there is an event on the position or zero if there is no event

no need for a script at all, although you can look up the list for the script equivalents of event commands if you really need it as script

Thanks a lot!

Original thread: https://forums.rpgmakerweb.com/threads/given-a-location-check-if-there-exists-an-event-maybe-return-the-event-id.131600/