Table of Contents

Class Location

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

A location in the module, represented by area, position and orientation.

public sealed class Location : EngineStructure, IDisposable
Inheritance
Location
Implements
Inherited Members
Extension Methods

Properties

Area

Gets the associated Area of this location.

FlippedRotation

Gets the inverted rotation value of this location (placeables).

GroundHeight

Gets the z-offset for the walkmesh at this location.

IsWalkable

Gets a value indicating whether the location is walkable.

Position

Gets the position Vector of this location.

Rotation

Gets the rotation value of this location.

StructureId
SurfaceMaterial

Gets the surface material index at this location.
Returns 0 if the location is invalid or has no surface type.

TileHeight

Gets the height of the tile set at this location.

TileId

Gets the id of the tile set at this location.

TileInfo

Gets the tile information at this location.

TileMainLightColorOne

Gets the color of the first main light in the tile containing this location.

TileMainLightColorTwo

Gets the color of the second main light in the tile containing this location.

TileRotation

Gets the rotation of the tile set at this location.

TileSourceLightColorOne

Gets the color of the first light source in the tile containing this location.

TileSourceLightColorTwo

Gets the color of the second light source in the tile containing this location.

Methods

ApplyEffect(EffectDuration, Effect, TimeSpan)

Applies the specified effect at this location.

Create(NwArea, Vector3, float)

Create a new location from the specified area, position and orientation

CreateTrap(TrapBaseType, float, string, string, string)

Creates the specified trap.

Distance(Location)

Returns the distance to the target.
If you only need to compare the distance, you can compare the squared distance using DistanceSquared(Location) to avoid a costly sqrt operation.

DistanceSquared(Location)

Returns the squared distance to the target.

GetNearestCreatures()

Gets all creatures near this location, ordered by distance.

GetNearestCreatures(CreatureTypeFilter)

Gets all creatures near this location, ordered by distance.

GetNearestCreatures(CreatureTypeFilter, CreatureTypeFilter)

Gets all creatures near this location, ordered by distance.

GetNearestCreatures(CreatureTypeFilter, CreatureTypeFilter, CreatureTypeFilter)

Gets all creatures near this location, ordered by distance.

GetNearestObjectsByType<T>()

Gets all objects near this location, ordered by distance.

GetObjectsInShape(Shape, float, bool, ObjectTypes, Vector3)

Gets all objects in a shape at this location.

GetObjectsInShapeByType<T>(Shape, float, bool, Vector3)

Gets all objects in a shape at this location of the specified type.

SetTile(int, TileRotation, int, SettleFlags)

Changes the tile at this location to a new tile.

SetTileAnimationLoops(bool, bool, bool)

Sets the state of the animation loops of the tile at this location.

Operators

implicit operator Location?(nint)