InvisibleTrue

From NWN Lexicon
Jump to navigationJump to search


InvisibleTrue(object)

Note: This function page documents something only available in the nw_i0_generic include file. The function may not be accurately documented here but you can read the nwscript code for the function in the game files.

Returns TRUE if the object is hidden either magically or via stealth.

int InvisibleTrue(
    object oSelf = OBJECT_SELF
);

Parameters

oSelf

The object whose invisibility status you want to know.

Description

Returns TRUE if the object is hidden either magically or via stealth.



Remarks

If any of the following effects are active on oSelf, then this function will return TRUE:
  - EFFECT_TYPE_INVISIBILITY
  - EFFECT_TYPE_IMPROVEDINVISIBILITY
  - SPELL_DARKNESS AND SPELL_DARKVISION
  - ACTION_MODE_STEALTH
  - EFFECT_TYPE_SANCTUARY
  - EFFECT_TYPE_ETHEREAL

Otherwise this function returns FALSE.


Requirements

#include " nw_i0_generic "


Version

???

Example

// Check to see if the calling object is invisible or not.  Then perform actions based on their invisible status.
#include "nw_i0_generic"

void main()
{
    // Check that OBJECT_SELF is or isn't currently invisible.
    int nCheck = InvisibleTrue(OBJECT_SELF);
    
    if(nCheck == TRUE)
    {
       // Do stuff cause they ARE invisible in one way or another.
    }
    else
    {
       //Do other stuff cauese they ARE NOT invisible.
    }
}

See Also

functions: 

GetHasEffect



author: Baragg, editors: Mistress, Kolyana