GetBit

From GECK

A function added by the New Vegas Script Extender.

Description

Returns the value of the bit at the specified position in a bitmask. Bit indices start at 0 and should not be greater than 20- higher values are unreliable and prone to conversion. Added by NVSE 5.0.1.

Syntax

(bool) GetBit BitMask:int BitIndex:int

Example

int BitMask
int BitTwo

set BitMask to 11		  ; binary: 10110000...
set BitTwo to GetBit BitMask, 2   ; 1

See Also

Personal tools