Ah, I see... there is indeed areas in VX, who would've thought that! Ah well... lemme explain them to you, know that I found them XD
Areas are stored in $data_areas, which is a hash. Areas are stored in there by their ID as the key (so, if your area's named AREA001, it's ID is 1; therefore the key in the hash is also 1). The couple of things stored in the value part of the hash are less important - what is is that there's the rect field, which is an instance of Rect class.
While all of this sounds complicated maybe, all it means is: You can access the area's coordinated pretty easily, however not easy enough to be actually adviseable... so, let me invest a few and modify the (actually existant) default method to check if the player is in an area, so it's a bit friendlier to use... (search for
def in_area?(area) within Game_Player in the script library and replace the whole method with the following)
[rgss] #--------------------------------------------------------------------------
# * Determine if in Area
# area : Area data (RPG::Area) or Area ID (Integer)
#--------------------------------------------------------------------------
def in_area?(area)
if area.is_a?(Integer)
area = $data_areas[area]
end
return false if area == nil
return false if $game_map.map_id != area.map_id
return false if @x < area.rect.x
return false if @y < area.rect.y
return false if @x >= area.rect.x + area.rect.width
return false if @y >= area.rect.y + area.rect.height
return true
end
[/rgss]
Now, all you have to put in your conditional is this:
if $game_player.in_area?(1)
# fancy code here
end
And this for a Conditional Branch event command:
While, again, 1 stands for AREA001. In case you renamed your areas, you can see the ID in the window header of the Area's window header.
I'd like some input if it works, especially since I couldn't really test it now without a maker, could I? :p It's optimized for fast processing and compatibility, meaning there's only a single additional line that encounter checks have to run through now (and you can't really evade that), and you retain compatibility to anything unless it's modifying this very method.