SetTile(location, int, int, int, int)

From NWN Lexicon
Jump to navigationJump to 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.

Change a tile in an area, it will also update the tile for all players in the area.

void SetTile(
    location locTile,
    int nTileID,
    int nOrientation,
    int nHeight = 0,


The tile location.
The tileID reference into the .set file.
The orientation of the tile, 0-3.
                0 = Normal orientation
                1 = 90 degrees counterclockwise
                2 = 180 degrees counterclockwise
                3 = 270 degrees counterclockwise
The height of the tile.
A bitmask of the SETTILE_FLAG_* constants.
          - SETTILE_FLAG_RELOAD_GRASS: reloads the area's grass, use if your tile used to have grass or should have grass now.
          - SETTILE_FLAG_RELOAD_BORDER: reloads the edge tile border, use if you changed a tile on the edge of the area.
          - SETTILE_FLAG_RECOMPUTE_LIGHTING: recomputes the area's lighting and static shadows, use most of time.


Change a tile in an area, it will also update the tile for all players in the area.

* Notes:
  - For optimal use you should be familiar with how tilesets / .set files work.
  - Will not update the height of non-creature objects.
  - Creatures may get stuck on non-walkable terrain.


Information icon.png This section of the article is a stub. You can help the NWN Lexicon by expanding it.


This function was added in 1.86.8193.35 of NWN:EE.


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: GetTileHeight() GetTileID() GetTileOrientation() SetTileAnimationLoops() SetTileJson()

 author: Shadguy