Difference between revisions of "EquipItem"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (1 revision: Importing auto-generated function articles)
(link, defaults, fix param2 desc)
Line 1: Line 1:
{{Generated with errors}}
 
 
{{dafunction
 
{{dafunction
 
|name=EquipItem
 
|name=EquipItem
Line 8: Line 7:
 
|param2type=object
 
|param2type=object
 
|param2name=oItem
 
|param2name=oItem
|param2desc=
+
|param2desc=The item to be equipped.
 
|param3type=int
 
|param3type=int
 
|param3name=nEquipSlot
 
|param3name=nEquipSlot
|param3desc=The optinal equip slot number. Use the INVENTORY_SLOT constants to specify a particular slot
+
|param3desc=The optional equip slot number. Use the [[INVENTORY_SLOT]] constants to specify a particular slot
 +
|param3default=INVENTORY_SLOT_INVALID
 
|param4type=int
 
|param4type=int
 
|param4name=nWeaponSet
 
|param4name=nWeaponSet
|param4desc=The optinal weapon set number, it can be 0 or 1
+
|param4desc=The optional weapon set number, it can be 0 or 1
 +
|param4default=INVALID_WEAPON_SET
 
|returntype=int
 
|returntype=int
|returndesc=
+
|returndesc=0 if incorrect slot or invalid object
 
|sourcefile=script.ldf
 
|sourcefile=script.ldf
 
|sourcemodule=
 
|sourcemodule=
Line 23: Line 24:
 
== Description ==
 
== Description ==
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
Equips an item from the inventory into the equiped slots.
+
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.  
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.  
+
  
 
<!-- == Remarks == -->
 
<!-- == Remarks == -->

Revision as of 22:36, 30 July 2009

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.