GetIsNeutral
From NWN Lexicon
Jump to navigationJump to search
GetIsNeutral(object, object)
Check whether a creature considers another creature to be neutral to them.
Parameters
oTarget
The creature to be checked for neutral status.
oSource
The creature whose opinion is queried. (Default: OBJECT_SELF)
Description
Returns TRUE if oSource considers oTarget as neutral, otherwise FALSE.
Version
1.22
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");
}
}
}
main()
{
object oAttacker = GetLastAttacker();
if(GetIsObjectValid(oAttacker))
{
if (GetIsNeutral(OBJECT_SELF,oAttacker) || GetIsFriend(OBJECT_SELF,oAttacker))
{
ActionStartConversation(oAttacker,"Warning");
}
}
}
See Also
functions: |
author: Tom Cassiotis, editor: Kristian Markon