GetNPCWarningStatus

From NWN Lexicon
Jump to navigationJump to search



GetNPCWarningStatus()

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.

Determines a NPC's state of mind toward another object.

int GetNPCWarningStatus();

Description

Returns an integer set by SetNPCWarningStatus() to provide a NPC's state of mind toward a creature that had or had not attacked it.



Remarks

SetNPCWarningStatus() should be called before calling this function.


Requirements

#include " NW_I0_GENERIC "

Version

1.22

Example

// This function demonstrates how to set and retrieve an NPC's warning status randomly
#include "NW_I0_GENERIC"

void main()
{
     SetNPCWarningStatus(Random(2));
     if(GetNPCWarningStatus()==FALSE)
     {
          ActionSpeakString("Hello Friend");
     }
}

See Also

functions: 

SetNPCWarningStatus



 author: Sarev0k, editor: Tom Cassiotis