Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:2.08

Description

Description:Creates an event handler that fires for specific AAR events.

Currently available events are:

  • "Saved": An AAR recording was saved (in the RTE), _this contains the full path to the AAR recording.
  • "Load": An AAR recording was loaded (in the AAR menu), _this contains the full path to the AAR recording.
  • "RecordedVariable" (V2.08+): A value was stored during the recording, using AARRecordValue; _this contains three elements: object, variable name, and value.
  • "Edited" (V17.2.0+): Edits the AAR data entries. The following three operations are available: Append, Delete, and Trim.
    • Append - Called when data entries from the appended AAR timeline are appended to the current AAR.
      • operation: String - Has to be "append".
      • appendFrom: String - Path to AAR files that have been appended.
      • originPath: String - Where to take the AAR data from.
      • targetPath: String - Where to put the modified AAR data to.
    • Delete - Called when deleting a selected time range from AAR. Data entries that are located outside of the selected range are copied to the new AAR file, while data entries located between the start and end time of the range are left out.
      • operation: String - Has to be "delete".
      • startTime: Number - Start time of the selection.
      • endTime: Number - End time of the selection.
      • originPath: String - Where to take the AAR data from.
      • targetPath: String - Where to put the modified AAR data to.
    • Trim - Called when a time range gets trimmed from AAR. Data entries that lie within the selected time range are copied to the new AAR files, while entries that extend outside the selected time range are trimmed.
      • operation: String - Has to be "trim".
      • startTime: Number - Start time of the selection.
      • endTime: Number - End time of the selection.
      • originPath: String - Where to take the AAR data from.
      • targetPath: String - Where to put the modified AAR data to.

The variable _this (which contains different values, depending on the event) can be used in the "action" segment of the event handler.

Syntax

Syntax:addAAREventHandler [event, action]
Parameters:
  • event: String - Type of event to monitor (see description).
  • action: String or Code - Command to perform when event triggers. Can use the variable _this - see description for its content.
Return Value:Number - Index of created event handler (to be used with removeAAREventHandler)

Examples

Examples:
_idx = addAAREventHandler ["Saved","player sidechat 'AAR was saved'"]
_idx = addAAREventHandler ["Load","[_this] execVM 'AARload.sqf'"]
_idx = addAAREventHandler ["Edited", {diag_log ("AAREH Edited: " + format ['%1', _this])}]

Additional Information

See also: removeAAREventHandler, removeAllAAREventHandlers
Multiplayer: 
Problems: 

Notes