EquipItem

From Dragon Age Toolset Wiki
Revision as of 22:36, 30 July 2009 by BryanDerksen (Talk | contribs) (link, defaults, fix param2 desc)

Jump to: navigation, search

Equips an item on a creature

int EquipItem(
object oObject,
object oItem,
int nEquipSlot = INVENTORY_SLOT_INVALID,
int nWeaponSet = INVALID_WEAPON_SET
);
Parameters:
oObject
The object to have its weapon set switched
oItem
The item to be equipped.
nEquipSlot
The optional equip slot number. Use the INVENTORY_SLOT constants to specify a particular slot
nWeaponSet
The optional weapon set number, it can be 0 or 1
Returns:

0 if incorrect slot or invalid object

Source:

script.ldf

Description

Equips an item from the inventory into the equiped slots. If no equipment slot is given, the item will be equipped where it best fits. If the equip slot is in the weapon set it will be equipped in the weapon set number that is given. If no weapon set number is given the active weapon set will be used. If an incorrect slot is given or an invalid object is given the function will return 0.