Difference between revisions of "EquipItem"
Jump to navigation
Jump to search
imported>SnakeChomp m (ObjectID is not optional) |
imported>Jazzisparis |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
== | {{Function | ||
[[EquipItem]] forces an actor to equip an item. | |CSWikiPage = EquipItem | ||
|origin = GECK1 | |||
|summary = [[EquipItem]] forces an actor to equip an item. | |||
|name = EquipItem | |||
|returnType = void | |||
|referenceType = [ActorRefID] | |||
|arguments = | |||
{{FunctionArgument | |||
|Name = ObjectID | |||
|Type = ref | |||
|Optional = n | |||
}}{{FunctionArgument | |||
|Name = NoUnequipFlag | |||
|Type = int | |||
|Value = 0, 1 | |||
|Optional = y | |||
}}{{FunctionArgument | |||
|Name = HideEquipMessage | |||
|Type = int | |||
|Value = 0, 1 | |||
|Optional = y | |||
}} | |||
|example = Player.EquipItem HuntingRifle 0 1 | |||
}} | |||
== | ==Notes== | ||
*If NoUnequipFlag = 1, actor (including the player) will be unable to unequip the item. Once the item is unequipped with the [[UnequipItem]] function, the item can be equipped and unequipped as normal. | *If NoUnequipFlag = 1, actor (including the player) will be unable to unequip the item. Once the item is unequipped with the [[UnequipItem]] function, the item can be equipped and unequipped as normal. | ||
*If HideEquipMessage = 1, the item equipped message will be hidden from the player. | *If HideEquipMessage = 1, the item equipped message will be hidden from the player. | ||
*In the case that the player has multiples of the specified item, it would appear that the item of lowest condition is the one equipped. If EquipItem is called on the same actor and in the same frame as [[AddItem]] or [[AddItemHealthPercent]], however, the last item added is equipped instead. | |||
*[[Ingestible]]s can be passed as the item to equip, resulting in the actor consuming the indicated item as normal, provided they have at least one in their inventory. The item is treated as though it were used normally, e.g. effects for food and aid items will scale with the player's Survival and Medicine skills respectively, and there is a possibility the player can become addicted if they use an addictive substance. | |||
==See Also== | |||
*[[EquipItemAlt]] | |||
*[[Force an actor to equip new stuff]] | |||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Functions (GECK 1.1)]] | |||
[[Category:Actor Functions]] | [[Category:Actor Functions]] | ||
[[Category:Actor Functions (GECK 1.1)]] | |||
[[Category:Object Functions]] | [[Category:Object Functions]] | ||
[[Category:Object Functions (GECK 1.1)]] |
Latest revision as of 21:18, 23 September 2015
< [[::Category:Functions|Category:Functions]]
Link to TES4 Construction Set Wiki: EquipItem.
A function included in the GECK version 1.1.0.36.
Description
EquipItem forces an actor to equip an item.
Syntax
[ActorRefID].EquipItem ObjectID:ref NoUnequipFlag:int{0, 1} HideEquipMessage:int{0, 1}
Example
Player.EquipItem HuntingRifle 0 1
Notes
- If NoUnequipFlag = 1, actor (including the player) will be unable to unequip the item. Once the item is unequipped with the UnequipItem function, the item can be equipped and unequipped as normal.
- If HideEquipMessage = 1, the item equipped message will be hidden from the player.
- In the case that the player has multiples of the specified item, it would appear that the item of lowest condition is the one equipped. If EquipItem is called on the same actor and in the same frame as AddItem or AddItemHealthPercent, however, the last item added is equipped instead.
- Ingestibles can be passed as the item to equip, resulting in the actor consuming the indicated item as normal, provided they have at least one in their inventory. The item is treated as though it were used normally, e.g. effects for food and aid items will scale with the player's Survival and Medicine skills respectively, and there is a possibility the player can become addicted if they use an addictive substance.