EN6_PRC8/_module/nss/nwnx_reveal.nss
Jaysyn904 a6f6db7303 Initial commit
Initial commit.  Updated release archive.
2024-06-13 15:08:33 -04:00

50 lines
1.8 KiB
Plaintext

/// @addtogroup reveal Reveal
/// @brief Allows the selective revealing of a stealthing character to another character or their party.
/// @{
/// @file nwnx_reveal.nss
#include "nwnx"
const string NWNX_Reveal = "NWNX_Reveal"; ///< @private
/// @name Reveal Detection Methods
/// @{
const int NWNX_REVEAL_SEEN = 1; ///< Seen
const int NWNX_REVEAL_HEARD = 0; ///< Heard
///@}
/// @brief Selectively reveals the character to an observer until the next time they stealth out of sight.
/// @param oHiding The creature who is stealthed.
/// @param oObserver The creature to whom the hider is revealed.
/// @param iDetectionMethod Can be specified to determine whether the hidden creature is seen or heard.
void NWNX_Reveal_RevealTo(object oHiding, object oObserver, int iDetectionMethod = NWNX_REVEAL_HEARD);
/// @brief Sets whether a character remains visible to their party through stealth.
/// @param oHiding The creature who is stealthed.
/// @param bReveal TRUE for visible.
/// @param iDetectionMethod Can be specified to determine whether the hidden creature is seen or heard.
void NWNX_Reveal_SetRevealToParty(object oHiding, int bReveal, int iDetectionMethod = NWNX_REVEAL_HEARD);
/// @}
void NWNX_Reveal_RevealTo(object oHiding, object oObserver, int iDetectionMethod = NWNX_REVEAL_HEARD)
{
string sFunc = "RevealTo";
NWNX_PushArgumentInt(iDetectionMethod);
NWNX_PushArgumentObject(oObserver);
NWNX_PushArgumentObject(oHiding);
NWNX_CallFunction(NWNX_Reveal, sFunc);
}
void NWNX_Reveal_SetRevealToParty(object oHiding, int bReveal, int iDetectionMethod = NWNX_REVEAL_HEARD)
{
string sFunc = "SetRevealToParty";
NWNX_PushArgumentInt(iDetectionMethod);
NWNX_PushArgumentInt(bReveal);
NWNX_PushArgumentObject(oHiding);
NWNX_CallFunction(NWNX_Reveal, sFunc);
}