Skip to content

engine:source

set

Type

function

Description

This function will set the Source1 modules for FC2. Providing these modules will help FC2 know how to automate its actions. You need to call this before using other functions here. The exception being Constellation4 as this is automatically done.

You need to provide at least client in the table arguments. engine and entity_list are optional. The modules (client and engine) must have been loaded by engine:process:get_module before this is called. If the module was not loaded previously by that function, this function will fail.

Parameters

  • table
    • string client
    • string engine
    • userdata/number entity_list

load_netvars

Type

function

Description

You must provide the address to the netvar manager in this function. If provided correctly, FC2 will automatically get all netvars and store it in the database for you to use later. You do not need to use this in Constellation4 because this is done automatically.

Parameters

  • userdata address

get_netvar

Type

function

Description

Gets a netvar value from the database. You do not need to use engine:source:load_netvars to use this in Constellation4 because this is done automatically.

Parameters

  • string table
  • string var

Returns

  • number

get_map

Type

function

Returns

  • string

dump_netvars

Type

function

Parameters

  • stringfile

get_client_state

Type

function

Returns

  • clientstate

get_globals

Type

function

Returns

  • table
  • number tick_count
  • number interval_per_tick
  • number sims_ticks_this_frame
  • number network_protocol
  • number interpolation_amount
  • number frame_count
  • number absolute_frame_time
  • number real_time
  • number absolute_frame_start_times_tddev
  • number cur_time
  • number frame_time
  • number max_clients