ActionUnequipItem(object)
From NWN Lexicon
Makes the executing creature unequip an object and place it in their inventory.
void ActionUnequipItem( object oItem );
Contents |
[edit] Parameters
- oItem
- The item to unequip.
[edit] Description
Causes the action subject (PC or NPC) to unequip oItem and place it in their inventory.
[edit] Remarks
Will do nothing if oItem is not valid.
oItem is not destroyed, but placed in the calling object's (PC or NPC) inventory.
You do not need to unequip an item before equipping another one, as equip functions (like ActionEquipItem) handle this automatically.
[edit] Version
1.27
[edit] Example
// Make a PC remove their clothing in an OnEnter script void main() { object oPC = GetEnteringObject(); if (GetIsPC(oPC)) { AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_CHEST , oPC))); } }
[edit] See Also
functions: | ActionEquipItem, GetItemInSlot |
author: Iskander Merriman, editor: Charles Feduke