NWNX:EE  8193.36.12
nwnx_visibility.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_Visibility = "NWNX_Visibility";
8 
12 const int NWNX_VISIBILITY_DEFAULT = -1;
14 const int NWNX_VISIBILITY_HIDDEN = 1;
19 
33 int NWNX_Visibility_GetVisibilityOverride(object oPlayer, object oTarget);
34 
54 void NWNX_Visibility_SetVisibilityOverride(object oPlayer, object oTarget, int nOverride);
55 
57 
58 int NWNX_Visibility_GetVisibilityOverride(object oPlayer, object oTarget)
59 {
60  string sFunc = "GetVisibilityOverride";
61 
62  NWNX_PushArgumentObject(oTarget);
63  NWNX_PushArgumentObject(oPlayer);
64  NWNX_CallFunction(NWNX_Visibility, sFunc);
65 
66  return NWNX_GetReturnValueInt();
67 }
68 
69 void NWNX_Visibility_SetVisibilityOverride(object oPlayer, object oTarget, int nOverride)
70 {
71  string sFunc = "SetVisibilityOverride";
72 
73  NWNX_PushArgumentInt(nOverride);
74  NWNX_PushArgumentObject(oTarget);
75  NWNX_PushArgumentObject(oPlayer);
76  NWNX_CallFunction(NWNX_Visibility, sFunc);
77 }
NWNX_GetReturnValueInt
int NWNX_GetReturnValueInt()
Returns the specified type from the c++ side.
Definition: nwnx.nss:94
NWNX_VISIBILITY_DM_ONLY
const int NWNX_VISIBILITY_DM_ONLY
Definition: nwnx_visibility.nss:15
NWNX_VISIBILITY_ALWAYS_VISIBLE
const int NWNX_VISIBILITY_ALWAYS_VISIBLE
Definition: nwnx_visibility.nss:16
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
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_INVA...
Definition: nwnx_visibility.nss:58
NWNX_PushArgumentObject
void NWNX_PushArgumentObject(object value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:69
NWNX_PushArgumentInt
void NWNX_PushArgumentInt(int value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:59
NWNX_VISIBILITY_DEFAULT
const int NWNX_VISIBILITY_DEFAULT
Definition: nwnx_visibility.nss:12
NWNX_VISIBILITY_VISIBLE
const int NWNX_VISIBILITY_VISIBLE
Definition: nwnx_visibility.nss:13
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_INVA...
Definition: nwnx_visibility.nss:69
NWNX_VISIBILITY_HIDDEN
const int NWNX_VISIBILITY_HIDDEN
Definition: nwnx_visibility.nss:14
NWNX_VISIBILITY_ALWAYS_VISIBLE_DM_ONLY
const int NWNX_VISIBILITY_ALWAYS_VISIBLE_DM_ONLY
Definition: nwnx_visibility.nss:17