SetPlotFlag(object, int)

Sets an object's plot status.

void SetPlotFlag(
    object oTarget,
    int bPlotFlag
);

Parameters

oTarget

Target object.

bPlotFlag

A TRUE or FALSE value.


Description

Sets the plot flag of object oTarget to the boolean value bPlotFlag. The parameter bPlotFlag can be either TRUE or FALSE.

It will do the same as checking the checkbox for "Plot" on a creature or items properties.



Remarks

Setting the plot flag for an object to TRUE marks this object as unable to be killed or destroyed; a necessary function for plot related NPCs, creatures and objects.

To let an NPC be damaged, but not destroyed, use SetImmortalFlag(), which stops damage down to 1HP.

Items set as plot cannot be sold (And are reported as "You cannot sell quest items").


Version

1.22

Example

void main()
{
    // mark this object as not able to be destroyed
    SetPlotFlag(OBJECT_SELF, TRUE);
}

See Also

functions: GetPlotFlag | SetImmortal
categories: Miscellaneous Functions


 author: Daniel Beckman, editor: Jasperre