GetEquipmentBipedMask
From GECK
(Redirected from GetEBM)
A function added by the New Vegas Script Extender.
Contents
Description
Returns the equipment flags used by the specified Armor as a combined value of the bits (int). Masks may be built by using ClearBit/SetBit.
Syntax
(Mask:int) GetEquipmentBipedMask ToGetMaskOf:armor
Or:
(Mask:int) GetEBM ToGetMaskOf:armor
Bit Fields
Flag | Bit | Equipment Mask |
---|---|---|
4 | 2 | HasBackpack |
8 | 3 | Medium Armor |
32 | 5 | Power Armor |
64 | 6 | Non-playable |
128 | 7 | HeavyArmor |
Other bits are either unused or unknown.
Example
int Mask let Mask := GetEquipmentBipedMask ArmorTeslaPower ; * 160 (Heavy + Power)
To check if some item has the "HeavyArmor" flag, you could use:
if Mask == (SetBit Mask, 7) ; It is "Heavy armor". ; (mask compares equal to self with bit7 set, so bit7 is already set) endif
You can alternatively use 'C' style bit operators in NVSE aware contexts, such as let or eval:
if eval Mask & (1 << 7) ; Bit7 is set, so the item is flagged as "Heavy armor" endif