-
Notifications
You must be signed in to change notification settings - Fork 2
Mod Reference Lua Functions
These are functions that lua scripts can call to interact with the core C/C++ game process, such as getting the ID or type of the currently controlled vehicle, the angle the current camera is pointing or to issue a production order. Most of these functions are named like update_* such as update_get_camera_heading()
is_keyboard = update_get_active_input_type() == e_active_input.keyboard
Will return the current input mode value as one of e_active_input
lang_pause = update_get_loc(e_loc.interaction_pause)
Will return the localised string from one of the index values defined in e_loc
Returns the Vehicle object handle for the vehicle that the screen is attached to.
update_play_sound(e_audio_effect_type.telemetry_2_radar)
Will trigger playback of one of the wav clips defined in e_audio_effect_type.
Note, this is only provided when you are on-foot. this function is not mapped when you are using an attached vehicle camera.
When called, the current screen/camera is exited. Eg, if you are viewing a camera from a vehicle control seat, you are returned to the control screen. If you are on the control screen, you are exited from the screen and remain in the seat.