Difference between revisions of "GetEquippedObject"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Geckbot
m (Robot: Automated text replacement (-'''.*'''\r\n +))
imported>Odessa
(expanded)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Function
{{Function
  |origin = FOSE1
  |origin = FOSE1
  |summary = Returns the base object of the item in the specified slot
  |summary = Returns the base object of the item equipped in the specified slot, for the calling reference. Return 0 (nothing) if no object is equipped there.
  |name = GetEquippedObject
  |name = GetEquippedObject
  |alias = GetEqObj
  |alias = GetEqObj
Line 8: Line 8:
  |arguments =  
  |arguments =  
   {{FunctionArgument
   {{FunctionArgument
   |Name = atIndex
   |Name = SlotID
   |Type = int
   |Type = int
   }}
   }}
}}
}}
==Example==
<pre>
ref rClothes
set rClothes to PlayerREF.GetEquippedObject 2 ; 'Upper Body'
</pre>
== Equipment Slot IDs ==
  0:    head
  1:    hair
  2:    upper body <i>(usual slot for armor and clothing)</i>
  3:    left hand
  4:    right hand
  5:    weapon
  6:    pip boy
  7:    backpack
  8:    necklace
  9:    headband
10:    hat
11:    eyeglasses
12:    nosering
13:    earrings
14:    mask
15:    choker
16:    mouth object
17:    body addon 1
18:    body addon 2
19:    body addon 3
==See Also==
*[[GetEquippedCurrentHealth]]
*[[IsInList]]
*[[Drop]]
*[[UnequipItem]]
*[[RemoveItem]]
*[[IsQuestItem]]
*[[GetItemValue]]
[[Category:Functions_(FOSE)]]
[[Category:Functions_(FOSE)]]

Latest revision as of 07:23, 17 July 2014

< [[::Category:Functions|Category:Functions]]

A function added by the Fallout Script Extender.

Description

Returns the base object of the item equipped in the specified slot, for the calling reference. Return 0 (nothing) if no object is equipped there.

Syntax

[help]
(ref) ref.GetEquippedObject SlotID:int 

Or:

(ref) ref.GetEqObj SlotID:int

Example

ref rClothes
set rClothes to PlayerREF.GetEquippedObject 2 ; 'Upper Body'

Equipment Slot IDs

 0:    head
 1:    hair
 2:    upper body (usual slot for armor and clothing)
 3:    left hand
 4:    right hand
 5:    weapon
 6:    pip boy
 7:    backpack
 8:    necklace
 9:    headband
10:    hat
11:    eyeglasses
12:    nosering
13:    earrings
14:    mask
15:    choker
16:    mouth object
17:    body addon 1
18:    body addon 2
19:    body addon 3

See Also