Fs2020 event

From Sim Innovations Wiki
Revision as of 13:20, 27 August 2021 by Admin (talk | contribs)
Jump to navigation Jump to search

Description

fs2020_event(event, value)

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

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 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")