IPRemoveAllItemProperties
Contents |
[edit] IPRemoveAllItemProperties(object, int)
Removes all itemproperties from an item.
void IPRemoveAllItemProperties( object oItem, DURATION_TYPE_TEMPORARY );
[edit] Parameters
oItem
Item to remove the properties from.
nItemPropertyDuration
[edit] Description
Removes ALL item properties from oItem matching nItemPropertyDuration
[edit] Remarks
The value for nItemPropertyDuration must be either DURATION_TYPE_PERMANENT or DURATION_TYPE_TEMPORARY. The instant duration does not apply to itemproperties.
If the value provided is DURATION_TYPE_PERMANENT, all permanent itemproperties are removed, leaving all temporary ones behind. And vice versa for DURATION_TYPE_TEMPORARY.
[edit] Known Bugs
Uses RemoveItemProperty, which has an accumulator
bug that may give an erroneous Stacking error message or affect subsequent functions in the same script.- 1/16/04, NWN Toolset version vts026, game version 1.61.8042 English
[edit] Requirements
#include " x2_inc_itemprop "
[edit] Version
1.61
[edit] Example
<nowiki>#include "x2_inc_itemprop" </nowiki> //Remove all properties from entering PC's helmet. void main() { //Entering object object oPC=GetEnteringObject(); //Only PCs if (!GetIsPC(oPC)) return; //That PC's helmet object oItem=GetItemInSlot(INVENTORY_SLOT_HEAD, oPC); //Stop script if the PC had no helmet on if (!GetIsObjectValid(oItem)) return; IPRemoveAllItemProperties(oItem, DURATION_TYPE_PERMANENT); IPRemoveAllItemProperties(oItem, DURATION_TYPE_TEMPORARY); }
[edit] See Also
functions: | |
constants: |
author: Lilac Soul, editor: Peter Busby