(Formerly known as global function GetLocationName, which is now obsolete)
static String Game.GetLocationName(int x, int y)
Returns the name of whatever is on the screen at (X,Y). This allows you to
create the Lucasarts-style status lines reading "Look at xxx" as the player
moves the cursor over them.
NOTE: Unlike ProcessClick, this function actually works on what the player can
see on the screen - therefore, if the co-ordinates are on a GUI, a blank string is returned.
NOTE: The co-ordinates are SCREEN co-ordinates, NOT ROOM co-ordinates. This
means that with a scrolling room, the co-ordinates you pass are relative to
the screen's current position, and NOT absolute room co-ordinates. This
means that this function is suitable for use with the mouse cursor position
variables.
Example:
String location = Game.GetLocationName(mouse.x, mouse.y);
will get the name of whatever the mouse is over into the string variable.
See Also: Hotspot.Name, InventoryItem.Name,
GetLocationType, Object.Name
|