GetIsReactionTypeNeutral(object, object)
Determine whether oSource has a neutral reaction towards oTarget
int GetIsReactionTypeNeutral( object oTarget, object oSource = OBJECT_SELF );
Parameters
oTarget
The target creature to test.
oSource
The source creature to test the feelings of. (Default: OBJECT_SELF)
Description
Returns TRUE if oSource has a neutral reaction towards oTarget, depending on the reputation, PVP setting and (if both oSource and oTarget are PCs), oSource's Like/Dislike setting for oTarget.
Remarks
If you just want to know how two objects feel about each other in terms of faction and personal reputation, use GetIsNeutral() instead.
Make sure you read up the Hostile and Friendly versions of this function.
Athough it wouldn't be usually required in spell scripts, this could be used still. If you wanted to affect *only ever* hostiles and neutrals, and never allies, you would check for either this, or GetIsReactionTypeHostile(), to be TRUE. See the example for this.
Version
1.62
Example
// This is a simple example. If you want something (perhaps // a spell) to only *ever* target hostile creatures *and* neutral // creatures, and thusly never ever affect allies, then you make // sure either of them are TRUE (they cannot both be true at once!) void main() { // Get spell target object oTarget = GetSpellTargetObject(); // Can only be an enemy, or a neutral. Allies will *never* be // one of these. if(GetIsReactionTypeHostile(oTarget) == TRUE || GetIsReactionTypeNeutral(oTarget) == TRUE) { // Do 5 damage to them, if we don't break PvP and so on effect eDam = EffectDamage(5); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); } }
See Also
functions: | GetIsNeutral |
categories: | Reputation/Faction Functions |
author: Jason Harris, editor: Jasperre, additional contributor(s): Kristian Markon, Jasperre