Fs2020 event

From Sim Innovations Wiki
Jump to navigation Jump to search

Description

fs2020_event(event)
fs2020_event(event, value_1)
fs2020_event(event, value_1, value_2) (from AM/AP 4.1)

fs2020_event is used to send an event to FS2020. And can contain a value (this is optional).

You can find the available events for FS2020 here (official).

Return value

This function won't return any value.

Arguments

# Argument Type Description
1 event String Reference to an event from Flight Simulator 2020. Use 'H:' prefix for H events, see example below.
2 value_1 Number (Optional) Send a value with the event. Some events support setting a value.
3 value_2 Number (Optional) Send a value with the event. Some events support setting a value.

Example

-- Toggle the Avionics Master switch
fs2020_event("TOGGLE_AVIONICS_MASTER")

-- Set stobe lights on
fs2020_event("STROBES_SET", 1)

-- Fire an H event
fs2020_event("H:AS1000_PFD_MENU_Push")