Searching Events in the Map to find events of the same name

Hello guys. I actually want to make a city scene in which I spawn several NPCs that walk around and exit the map. I have done that part successfully.

I have all the NPC events in a template map which I spawn from. They are randomly selected and spawned.
CF3e4yW.png


The problem is that I don't want two NPC's to look the same while they are on the map. I want to search all events on the Map and an NPC event exists with the same Name or same Graphic as the one I am about to summon, then I wouldn't spawn it.
lNasYMP.png
You can have an array that stores all the base event IDs, then pick a random ID from the array to pick which event to copy, and remove that ID from the array after
Thank You Very Much! I figured it out! I have no more queries. Thanks a lot again!!

Original thread: https://forums.rpgmakerweb.com/threads/searching-events-in-the-map-to-find-events-of-the-same-name.108864/