ActionUnequipItem(object)
Makes the executing creature unequip an object and place it in their inventory.
void ActionUnequipItem( object oItem );
Parameters
oItem
The item to unequip.
Description
Causes the executing object (PC or NPC) to unequip oItem and place it in their inventory.
Remarks
Will do nothing if oItem == OBJECT_INVALID.
oItem is not destroyed, but placed in the calling object's (PC or NPC) inventory.
Version
1.27
Example
// Make a PC remove their clothing in an OnEnter script # include "nw_i0_generic" void main() { object oPC = GetEnteringObject(); if (GetIsPC(oPC)) { AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_CHEST , oPC))); } }
See Also
functions: | ActionEquipItem | ActionTakeItem | GetItemInSlot |
categories: | Action on Object Functions | Inventory Functions |
author: Iskander Merriman, editor: Charles Feduke