I wanted to make a script that goes through all events in all maps, and checks if it's name is equal to a specific string.
And if it ís equal, store the x, y and map of that event in an Array in a Hash.
Something like this (I guess):
[rgss]module Database
begin
for i in 0..ALL_EVENTS
if i.name == "String"
@hash = [x, y, map]
end
end
@hash.compact
end
def Database.events
return @hash
end
end
[/rgss]
But I didn't find a way to iterate through all events on all maps...
Note: I am aware of the fact that, if you want to check 200 events on 999 maps it will take a long time and cause great lag, but that is not a problem at this point.
I don't know whether this is even possible. Please help me out here!
Thanks in advance
And if it ís equal, store the x, y and map of that event in an Array in a Hash.
Something like this (I guess):
[rgss]module Database
begin
for i in 0..ALL_EVENTS
if i.name == "String"
@hash = [x, y, map]
end
end
@hash.compact
end
def Database.events
return @hash
end
end
[/rgss]
But I didn't find a way to iterate through all events on all maps...
Note: I am aware of the fact that, if you want to check 200 events on 999 maps it will take a long time and cause great lag, but that is not a problem at this point.
I don't know whether this is even possible. Please help me out here!
Thanks in advance