Skip to content

Flag functions

clr_flag

source

function clr_flag(flags: Flags, bit: integer): Flags
flags: Flags
bit: 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

source

function clr_mask(flags: Flags, mask: Flags): Flags
flags: Flags
mask: Flags

Returns 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

source

function flip_flag(flags: Flags, bit: integer): Flags
flags: Flags
bit: 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

source

function flip_mask(flags: Flags, mask: Flags): Flags
flags: Flags
mask: Flags

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.

get_entity_flags

source

function get_entity_flags(uid: integer): ENT_FLAG
uid: integer

Returns ENT_FLAG

Get the flags field from entity by uid

get_entity_flags2

source

function get_entity_flags2(uid: integer): ENT_MORE_FLAG
uid: integer

Returns ENT_MORE_FLAG

Get the more_flags field from entity by uid

get_level_flags

source

function get_level_flags(): integer

Returns integer

Get state.level_flags

set_entity_flags

source

function set_entity_flags(uid: integer, flags: ENT_FLAG)
uid: integer
flags: ENT_FLAG

Set the flags field from entity by uid

set_entity_flags2

source

function set_entity_flags2(uid: integer, flags: ENT_MORE_FLAG)
uid: integer
flags: ENT_MORE_FLAG

Set the more_flags field from entity by uid

set_flag

source

function set_flag(flags: Flags, bit: integer): Flags
flags: Flags
bit: 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

source

function set_level_flags(flags: integer)
flags: integer

Set state.level_flags

set_mask

source

function set_mask(flags: Flags, mask: Flags): Flags
flags: Flags
mask: Flags

Returns 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

source

function test_flag(flags: Flags, bit: integer): boolean
flags: Flags
bit: integer

Returns boolean

Returns true if the nth bit is set in the number.

test_mask

source

function test_mask(flags: Flags, mask: Flags): boolean
flags: Flags
mask: Flags

Returns boolean

Returns true if a bitmask is set in the number.