GetTileExplored(object, object, int, int)
Returns whether the given tile in an area is visible for the given creature.
int GetTileExplored(
object creature,
object area,
int x,
int y);
Parameters
- creature
- The creature for whom the area is to be checked. Must be a player or player-possessed creature.
- area
- The area in which the tile is located.
- x
- The location of the tile on the x axis.
- y
- The location of the tile on the y axis.
Description
Returns whether the given tile at x, y, for the given creature in the stated area is visible on the map. Note that creature needs to be a player- or player-possessed creature.
Tile positioning, like game coordinate Position (obtained via e.g. GetPosition()), is oriented from the bottom-left-hand corner of areas (south-west corner). In other words, the bottom-left-hand corner of the area is Tile {0,0} (and Position {0.0,0.0}). Consequently, tile numbers ascend from left to right on the X axis, and from bottom to top on the Y axis.
Note that this function will always return either 0 or 1 if you specify a valid creature, area and tile numbers between 0 and 31, regardless of the area size. For example, if your area size is only 16x16, and you run GetTileExplored(oPC, oArea, 31, 31), the function will still return 0 instead of -1, despite there being no tile {31,31} in your 16x16 area.
Keep in mind that tile exploration also controls object visibility in areas and the fog of war for interior and underground areas.
Return values:
| Value | Description |
|---|---|
| -1 | Area or creature invalid |
| 0 | Tile is not explored yet |
| 1 | Tile is explored |
Remarks
Version
This function was added in 1.74.8154 of NWN:EE.
Example
See Also
| functions: | SetTileExplored() |