SetTileExplored(object, object, int, int, int)

From NWN Lexicon
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Sets whether the given creature has explored a given tile in an area.
int SetTileExplored(
    object creature,
    object area,
    int x,
    int y,
    int newState);


The creature for whom the area is to be explored. Must be a player or player-possessed creature.
The area in which the tile is to be explored.
The location of the tile on the x axis.
The location of the tile on the y axis.
Whether the tile should be explored.


Sets if the given creature has explored tile at x, y of the given area. Note that creature needs to be a player- or player-possessed creature.

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 was not explored before setting newState
1 Tile was explored before setting newState





Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.

See Also

functions: GetTileExplored()