InvisibleTrue(object)

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
categories:  Get Data from Object Functions


author: Baragg, editors: Mistress, Kolyana