Readme
Allows the visibility of objects to be overridden globally or per player
|
int | NWNX_Visibility_GetVisibilityOverride (object oPlayer, object oTarget) |
| Queries the existing visibility override for given (oPlayer, oTarget) pair. If oPlayer is OBJECT_INVALID, the global visibility override will be returned. More...
|
|
void | NWNX_Visibility_SetVisibilityOverride (object oPlayer, object oTarget, int nOverride) |
| Overrides the default visibility rules about how oPlayer perceives oTarget. If oPlayer is OBJECT_INVALID, the global visibility override will be set. More...
|
|
◆ NWNX_Visibility_GetVisibilityOverride()
int NWNX_Visibility_GetVisibilityOverride |
( |
object |
oPlayer, |
|
|
object |
oTarget |
|
) |
| |
Queries the existing visibility override for given (oPlayer, oTarget) pair. If oPlayer is OBJECT_INVALID, the global visibility override will be returned.
- NWNX_VISIBILITY_DEFAULT = Override not set.
- NWNX_VISIBILITY_VISIBLE = Target is visible but still adheres to default visibility rules.
- NWNX_VISIBILITY_HIDDEN = Target is always hidden.
- NWNX_VISIBILITY_DM_ONLY = Target is only visible to DMs but still adheres to default visibility rules.
- NWNX_VISIBILITY_ALWAYS_VISIBLE = Target is always visible in all circumstances.
- NWNX_VISIBILITY_ALWAYS_VISIBLE_DM_ONLY = Target is always visible only to DMs in all circumstances.
- Parameters
-
oPlayer | The PC Object or OBJECT_INVALID. |
oTarget | The object for which we're querying the visibility override. |
- Returns
- The Visibility Type.
Definition at line 58 of file nwnx_visibility.nss.
◆ NWNX_Visibility_SetVisibilityOverride()
void NWNX_Visibility_SetVisibilityOverride |
( |
object |
oPlayer, |
|
|
object |
oTarget, |
|
|
int |
nOverride |
|
) |
| |
Overrides the default visibility rules about how oPlayer perceives oTarget. If oPlayer is OBJECT_INVALID, the global visibility override will be set.
- NWNX_VISIBILITY_DEFAULT = Remove a set override.
- NWNX_VISIBILITY_VISIBLE = Target is visible but still adheres to default visibility rules.
- NWNX_VISIBILITY_HIDDEN = Target is always hidden.
- NWNX_VISIBILITY_DM_ONLY = Target is only visible to DMs but still adheres to default visibility rules.
- NWNX_VISIBILITY_ALWAYS_VISIBLE = Target is always visible in all circumstances.
- NWNX_VISIBILITY_ALWAYS_VISIBLE_DM_ONLY = Target is always visible to DMs in all circumstances.
- Warning
- Setting too many objects to ALWAYS_VISIBLE in an area will impact the performance of your players. Use sparingly.
- Note
- Player state overrides the global state which means if a global state is set to NWNX_VISIBILITY_HIDDEN or NWNX_VISIBILITY_DM_ONLY but the player's state is set to NWNX_VISIBILITY_VISIBLE for the target, the object will be visible to the player.
- Parameters
-
oPlayer | The PC Object or OBJECT_INVALID. |
oTarget | The object for which we're altering the visibility. |
nOverride | The visibility type from Visibility Types. |
Definition at line 69 of file nwnx_visibility.nss.
◆ NWNX_VISIBILITY_DEFAULT
const int NWNX_VISIBILITY_DEFAULT = -1 |
◆ NWNX_VISIBILITY_VISIBLE
const int NWNX_VISIBILITY_VISIBLE = 0 |
◆ NWNX_VISIBILITY_HIDDEN
const int NWNX_VISIBILITY_HIDDEN = 1 |
◆ NWNX_VISIBILITY_DM_ONLY
const int NWNX_VISIBILITY_DM_ONLY = 2 |
◆ NWNX_VISIBILITY_ALWAYS_VISIBLE
const int NWNX_VISIBILITY_ALWAYS_VISIBLE = 3 |
◆ NWNX_VISIBILITY_ALWAYS_VISIBLE_DM_ONLY
const int NWNX_VISIBILITY_ALWAYS_VISIBLE_DM_ONLY = 4 |