This wiki is a copy of the original Oblivion CS wiki created and maintained by the UESP.net. See CSwiki:Copy Notice for more info.

Difference between revisions of "GetEquipmentSlotMask"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Therealneraverine
imported>Therealneraverine
Line 33: Line 33:
*If no 'value' parameter is specified, it is assumed to be the same value as the 'mask' parameter.
*If no 'value' parameter is specified, it is assumed to be the same value as the 'mask' parameter.


A value of 0 is returned by the function if the slot is empty.
*A value of 0 is returned by the function if the slot is empty.


[[Category:Functions]]
[[Category:Functions]]

Revision as of 11:26, 6 July 2009

A command for Oblivion Script Extender

Syntax:

(objectID:ref) reference.GetEquipmentSlotMask slotMask:long value:long

Returns the base object of the first equipped object to match the specified equipment slot mask.

Equipment slot bit assignments:
 0x00000001 1 Head
 0x00000002 2 Hair
 0x00000004 4 UpperBody
 0x00000008 8 LowerBody
 0x00000010 16 Hand
 0x00000020 32 Foot
 0x00000040 64 RightRing
 0x00000080 128 LeftRing
 0x00000100 256 Amulet
 0x00000200 512 Weapon
 0x00000400 1024 BackWeapon
 0x00000800 2048 SideWeapon
 0x00001000 4096 Quiver
 0x00002000 8192 Shield
 0x00004000 16384 Torch
 0x00008000 32768 Tail
 0x00010000 65536 Weapon
 0x00020000 131072 Ammo
 0x00040000 262144 Ranged Weapon

Example: An object taking up the UpperBody, LowerBody, and Foot slots would have a mask of 4 + 8 + 32 = 44.

Notes

  • If no 'value' parameter is specified, it is assumed to be the same value as the 'mask' parameter.
  • A value of 0 is returned by the function if the slot is empty.