(Formerly known as global function GetRegionAt, which is now obsolete)
static Region* Region.GetAtRoomXY(int x, int y)
Returns the region at ROOM co-ordinates (X,Y).
If there is no region there, or if invalid co-ordinates are specified,
the Region* representing region 0 will be returned.
NOTE: Unlike GetHotspotAtLocation, the co-ordinates specified are ROOM co-ordinates. This
means that if you want to use the mouse cursor location, you have to add the
screen offset to make it work in scrolling rooms.
Example:
if (Region.GetAtRoomXY(player.x, player.y) == region[0])
Display("The player is not currently standing on a region.");
See Also: GetWalkableAreaAt
|