MZ Check Name of Event by Event ID

Afternoon all,

It does not seem at all like there is a 'name' property associated with Game_Event, even though you give it a name on the map.


Anyone know of a way to retrieve the name of an event using its event ID?


Sorted actually:


$gameMap._events[eventId].event().name
Afternoon all,

It does not seem at all like there is a 'name' property associated with Game_Event, even though you give it a name on the map.


Anyone know of a way to retrieve the name of an event using its event ID?


Sorted actually:


$gameMap._events[eventId].event().name
Could shorten it a bit:
JavaScript:
$dataMap.events[eventId].name
Could shorten it a bit:
JavaScript:
$dataMap.events[eventId].name


Yeap that was also a solution given in discord haha. Thanks @Arthran

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/check-name-of-event-by-event-id.168185/