builtin

Methods

wait

function native.builtin.wait(ms: int): void

timera

Counts up. Every 1000 is 1 real-time second. Use SETTIMERA(int value) to set the timer (e.g.: SETTIMERA(0)).

function native.builtin.timera(): int

timerb

function native.builtin.timerb(): int

settimera

function native.builtin.settimera(value: int): void

settimerb

function native.builtin.settimerb(value: int): void

timestep

Gets the current frame time.

function native.builtin.timestep(): float

sin

function native.builtin.sin(value: float): float

cos

function native.builtin.cos(value: float): float

sqrt

function native.builtin.sqrt(value: float): float

pow

function native.builtin.pow(base: float, exponent: float): float

log10

Old name: _LOG10

function native.builtin.log10(value: float): float

vmag

Calculates the magnitude of a vector.

function native.builtin.vmag(x: float, y: float, z: float): float

vmag2

Calculates the magnitude of a vector but does not perform Sqrt operations. (Its way faster)

function native.builtin.vmag2(x: float, y: float, z: float): float

vdist

Calculates distance between vectors. The value returned will be in meters.

function native.builtin.vdist(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float): float

vdist2

Calculates distance between vectors but does not perform Sqrt operations. (Its way faster) The value returned will be in RAGE units.

function native.builtin.vdist2(x1: float, y1: float, z1: float, x2: float, y2: float, z2: float): float

shift_left

function native.builtin.shift_left(value: int, bit_shift: int): int

shift_right

function native.builtin.shift_right(value: int, bit_shift: int): int

floor

Rounds a float value down to the next whole number

function native.builtin.floor(value: float): int

ceil

Rounds a float value up to the next whole number

function native.builtin.ceil(value: float): int

round

function native.builtin.round(value: float): int

to_float

function native.builtin.to_float(value: int): float

set_this_thread_priority

THREAD_PRIO_HIGHEST = 0 THREAD_PRIO_NORMAL = 1 THREAD_PRIO_LOWEST = 2 THREAD_PRIO_MANUAL_UPDATE = 100

function native.builtin.set_this_thread_priority(priority: int): void