I am trying to find the ID of a map event by using that event's name. I might have "Enemy1" be event # 005 on one map, but it might be event # 002 on another. So I am hoping to use "Enemy1" from the name box to help me find that event's ID#.
I have been trying so far and have only gotten this
def find_enemy_event_ID(i)
# Determine the enemies' event IDs
$events ||= load_data('data/MapInfos.rxdata')
for key, value in $events
return key if value == "Enemy" + (i).to_s
end
return 000
end
Where i would be the enemy# I am looking for
I don't know if this is just incorrect coding or if it is even possible to retrieve the information I need like this. I am trying to modify some code Zeriab previously helped me with, but I do not know where the information I need is stored.
Any help would be greatly appreciated.