Fs2020 event subscribe

From Sim Innovations Wiki
Jump to navigation Jump to search

Description

fs2020_event_subscribe(event, callback)

fs2020_event_subscribe is used to subscribe to a FS2020 event. Only B events are supported at the moment.

Return value

This function won't return any value.

Arguments

# Argument Type Description
1 event String Reference to the FS2020 event
2 callback Function The function to call when a new event has been sent within FS2020

Example

fs2020_event_subscribe("B:HANDLING_InertSep", function()
      print("The event got triggered within FS2020!")
  end)