Flag functions
clr_flag
function clr_flag(flags: Flags, bit: integer): Flagsflags:Flagsbit:integer
Returns Flags
Clears the nth bit in a number. This doesn't actually change the variable you pass, it just returns the new value you can use.
clr_mask
function clr_mask(flags: Flags, mask: Flags): FlagsReturns Flags
Clears a bitmask in a number. This doesn't actually change the variable you pass, it just returns the new value you can use.
flip_flag
function flip_flag(flags: Flags, bit: integer): Flagsflags:Flagsbit:integer
Returns Flags
Flips the nth bit in a number. This doesn't actually change the variable you pass, it just returns the new value you can use.
flip_mask
function flip_mask(flags: Flags, mask: Flags): FlagsReturns Flags
Flips the nth bit in a number. This doesn't actually change the variable you pass, it just returns the new value you can use.
get_entity_flags
function get_entity_flags(uid: integer): ENT_FLAGuid:integer
Returns ENT_FLAG
Get the flags field from entity by uid
get_entity_flags2
function get_entity_flags2(uid: integer): ENT_MORE_FLAGuid:integer
Returns ENT_MORE_FLAG
Get the more_flags field from entity by uid
get_level_flags
function get_level_flags(): integerReturns integer
Get state.level_flags
set_entity_flags
function set_entity_flags(uid: integer, flags: ENT_FLAG)uid:integerflags:ENT_FLAG
Set the flags field from entity by uid
set_entity_flags2
function set_entity_flags2(uid: integer, flags: ENT_MORE_FLAG)uid:integerflags:ENT_MORE_FLAG
Set the more_flags field from entity by uid
set_flag
function set_flag(flags: Flags, bit: integer): Flagsflags:Flagsbit:integer
Returns Flags
Set the nth bit in a number. This doesn't actually change the variable you pass, it just returns the new value you can use.
set_level_flags
function set_level_flags(flags: integer)flags:integer
Set state.level_flags
set_mask
function set_mask(flags: Flags, mask: Flags): FlagsReturns Flags
Set a bitmask in a number. This doesn't actually change the variable you pass, it just returns the new value you can use.
test_flag
function test_flag(flags: Flags, bit: integer): booleanflags:Flagsbit:integer
Returns boolean
Returns true if the nth bit is set in the number.
test_mask
function test_mask(flags: Flags, mask: Flags): booleanReturns boolean
Returns true if a bitmask is set in the number.