spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Region functions and properties

GetAtRoomXY (region)

(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


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.