OBJECT_TYPE_* Constant Group
From NWN Lexicon
(Redirected from Object type)
Jump to navigationJump to searchConstant group used to categorize types of objects.
Usage
Some functions take an OR'ed list of object types, eg:
// Creatures or placeables
EnterTargetingMode(oPC, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE);
// Doors, placeables, creatures
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, GetSpellTargetLocation(), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
EnterTargetingMode(oPC, OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE);
// Doors, placeables, creatures
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, GetSpellTargetLocation(), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
Other functions only accept a single input;
The NWN:EE only constant OBJECT_TYPE_TILE is used solely with the OnPlayerTarget event. You can't find tiles as literal game objects.
Constants
Constant | Value | Description |
---|---|---|
OBJECT_TYPE_ALL | 32767 | Specifies all objects. Used for unrestricted searches. Strangely, OBJECT_TYPE_ALL and OBJECT_TYPE_INVALID equal the same value. |
OBJECT_TYPE_AREA_OF_EFFECT | 16 | Specifies the object is an area of effect (AOE). |
OBJECT_TYPE_CREATURE | 1 | Specifies the object is a creature (PC, animal, monster etc). |
OBJECT_TYPE_DOOR | 8 | Specifies the object is a door. |
OBJECT_TYPE_ENCOUNTER | 256 | Should specify an object which is an encounter, although no reference to this constant appears within NWScript other than its declaration. |
OBJECT_TYPE_INVALID | 32767 | Specifies the object is invalid. Strangely, OBJECT_TYPE_INVALID and OBJECT_TYPE_ALL equal the same value. OBJECT_TYPE_INVALID has an integer value of 32,767. |
OBJECT_TYPE_ITEM | 2 | Specifies the object is an item. |
OBJECT_TYPE_PLACEABLE | 64 | Specifies the object is a placeable. |
OBJECT_TYPE_STORE | 128 | Specifies the object is a store. |
OBJECT_TYPE_TILE | 512 | Specifies the object is a tile (or "location on the ground") - only in use by EnterTargetingMode. |
OBJECT_TYPE_TRIGGER | 4 | Specifies the object is a trigger. |
OBJECT_TYPE_WAYPOINT | 32 | Specifies the object is a waypoint. |
Remarks
Modules and Areas have an area type of 0. There is no constant for this value.
Known Bugs
There is no object type for sound objects, and it returns OBJECT_TYPE_INVALID instead. You can't filter for this type in the functions that use it.
Version
This constants group was updated in 1.80.8193.14 of NWN:EE.
This function was updated in 1.87.8193.35 of NWN:EE. GetFirstObjectInArea()/GetNextObjectInArea now has a nObjectFilter parameter.
See Also
functions: |