GetIsNeutral

From NWN Lexicon



Contents

[edit] GetIsNeutral(object, object)

Check whether a creature considers another creature to be neutral to them.

int GetIsNeutral(
    object oTarget,
    object oSource = OBJECT_SELF
);

[edit] Parameters

oTarget

The creature to be checked for neutral status.

oSource

The creature whose opinion is queried. (Default: OBJECT_SELF)


[edit] Description

Returns TRUE if oSource considers oTarget as neutral, otherwise FALSE.



[edit] Version

1.22

[edit] Example

// Gives a warning to an attacker that is neutral or a friend to the attackee
main()
{
   object oAttacker = GetLastAttacker();
   if(GetIsObjectValid(oAttacker))
   {
      if (GetIsNeutral(OBJECT_SELF,oAttacker) || GetIsFriend(OBJECT_SELF,oAttacker))
      {
         ActionStartConversation(oAttacker,"Warning");
      }
   }
}

[edit] See Also

functions: 

GetIsReactionTypeNeutral



 author: Tom Cassiotis, editor: Kristian Markon
 

Personal tools
Categories