Difference between revisions of "GetPlotFlag"

From NWN Lexicon
Jump to: navigation, search
Line 1: Line 1:
 
+
{{DISPLAYTITLE:GetPlotFlag(object)}}__NOTOC__
 
+
Determines whether an object is flagged as plot.
 
 
 
 
=GetPlotFlag(object)=
 
 
 
Determines whether an object is flagged as plot item.
 
 
 
 
<nwscript>
 
<nwscript>
 
int GetPlotFlag(
 
int GetPlotFlag(
Line 15: Line 9:
 
====Parameters====
 
====Parameters====
  
''oTarget''
+
;oTarget
 
+
:The object to determine whether it is a plot. (Default: OBJECT_SELF)
The object to determine whether it is a plot. (Default: OBJECT_SELF)
 
 
 
<br />
 
  
 
====Description====
 
====Description====
Line 25: Line 16:
 
Returns TRUE if oTarget is a plot object, otherwise FALSE.
 
Returns TRUE if oTarget is a plot object, otherwise FALSE.
  
<br /><br />
 
  
 
====Remarks====
 
====Remarks====
Line 31: Line 21:
 
A plot flag affects an item, placeable, or creature considerably. It is meant to protect the item, placeable, or creature from death or destruction. It also has an affect on the AI of a creature. A creature that is plot will not turn hostile against others, for instance. It will still attack those that it was hostile against at the time of becoming plot, though. Also, attacking a plot creature can actually cause it to strike back at you, and then your only solution is to run away and wait for the plot creature to exit combat mode. A plot object does not take any damage and plot items cannot be sold.
 
A plot flag affects an item, placeable, or creature considerably. It is meant to protect the item, placeable, or creature from death or destruction. It also has an affect on the AI of a creature. A creature that is plot will not turn hostile against others, for instance. It will still attack those that it was hostile against at the time of becoming plot, though. Also, attacking a plot creature can actually cause it to strike back at you, and then your only solution is to run away and wait for the plot creature to exit combat mode. A plot object does not take any damage and plot items cannot be sold.
  
<br />
+
Almost every negative effect will not affect a plot creature, but positive and healing effects will work as normal. A comprehensive list of what effects affect a plot creature or placeable needs to be determined.
 +
 
 +
You need to remove the plot flag before [[DestroyObject]] will work.
 +
 
 +
An alternative for creatures to the plot flag is [[GetImmortal|immortality]] which while it restricts ''some'' hostile effects including [[EffectDeath]], the majority (and importantly [[EffectDamage]]) still work, with the creature not able to go under 1HP, allowing suitable "boss-talk" when the creature is defeated.
  
 
====Version====
 
====Version====
Line 43: Line 37:
 
|
 
|
 
[[  SetPlotFlag  | SetPlotFlag ]]
 
[[  SetPlotFlag  | SetPlotFlag ]]
 +
 +
[[GetImmortal]]
 +
 +
[[SetImmortal]]
 
|-
 
|-
 
|}
 
|}

Revision as of 17:15, 2 March 2021

Determines whether an object is flagged as plot.

int GetPlotFlag(
    object oTarget = OBJECT_SELF
);

Parameters

oTarget
The object to determine whether it is a plot. (Default: OBJECT_SELF)

Description

Returns TRUE if oTarget is a plot object, otherwise FALSE.


Remarks

A plot flag affects an item, placeable, or creature considerably. It is meant to protect the item, placeable, or creature from death or destruction. It also has an affect on the AI of a creature. A creature that is plot will not turn hostile against others, for instance. It will still attack those that it was hostile against at the time of becoming plot, though. Also, attacking a plot creature can actually cause it to strike back at you, and then your only solution is to run away and wait for the plot creature to exit combat mode. A plot object does not take any damage and plot items cannot be sold.

Almost every negative effect will not affect a plot creature, but positive and healing effects will work as normal. A comprehensive list of what effects affect a plot creature or placeable needs to be determined.

You need to remove the plot flag before DestroyObject will work.

An alternative for creatures to the plot flag is immortality which while it restricts some hostile effects including EffectDeath, the majority (and importantly EffectDamage) still work, with the creature not able to go under 1HP, allowing suitable "boss-talk" when the creature is defeated.

Version

1.61

See Also

functions: 

SetPlotFlag

GetImmortal

SetImmortal



 author: Tom Cassiotis, editor: Lilac Soul