MSFS Mission Script - Actions: Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
(→‎General attributes: Add targetplayer)
m (→‎TimerAdjustAction: Fixed link)
Line 75: Line 75:


==== TimerAdjustAction ====
==== TimerAdjustAction ====
Changes the time of a [[TimerTrigger]].
Changes the time of a [[Timer Trigger|TimerTrigger]].
 
== Event ==
== Event ==
==== EventTriggerAction ====
==== EventTriggerAction ====

Revision as of 13:50, 13 October 2021


All actions are fired in the order they’re listed in the ObjectReferenceList of the trigger that fired. This is important, because Dialog actions take time to play and will delay any actions that follow them. If a delay is set on a Dialog action, then the next action in the queue will be delayed by that amount. You can arrange the order in which actions in a given queue fire by changing the order manually in the .xml. See MSFS Mission Script for general information about creating a mission script.

General attributes

Actions have a few general attributes:

Immediate

True: This action will start immediately

False: This action will wait for other actions to complete. The order is determined by the order the actions are listed in the trigger. This can be changed by manually editing the order in the ObjectReference section of the element in the mission .xml.

BreakOnExecute

Official description: "Code break if action is executed". Not sure what that means

TargetPlayer

The target player refers to the target of an action in a multiplayer mission. Action Target can be the GUID of a particular player or team, or you can use one of the specially defined guids to refer to relative targets:

Local User {8B7615FA-BBBF-4baa-B959-5EF4F59BB575}
All Players {D09ADD85-4CA8-4be9-939C-4544BA259DA2}
Trigger {9A82F89B-F271-4285-AE90-1F733945D975}
All Players Except Trigger {D2764AC8-FBB3-4b9b-9721-3C3EA0CB402B}

Common actions

ObjectActivationAction

Very useful action to (de)activate objects such as triggers and InGameMarkers.

DialogAction

Plays dialog for the copilot and atc. It can use sound files or text-to-speech (TTS). The dialogAction can also show subtitles.

AdjustPayloadAction

Changes the payload during the mission.

ChangeAssistanceItemAction

Changes specific assistance items throughout the mission.

FadeToColorAction

Fades a color over the whole viewport. Useful for teleports and testing.

RandomAction

Chooses a random action from a list and can have a probability that an action executes.

RequestTeleportAction

Actions related to a trigger

CountAction

Changes the count of a CounterTrigger

ResetTimerAction

TimerAdjustAction

Changes the time of a TimerTrigger.

Event

EventTriggerAction

Flowstate

FlowEventAction

FlowStateAction

Action related to Mission objects

GoalResolutionAction & SubGoalResolutionAction

Changes the state of a Goal.

GrantRewardAction

Untested.

PointOfInterestActivationAction

(De)activates a point of interest

Action related to AI / Simobjects

ActivateWaypointsAction

Send waypoints to a Simobject for the AI to follow.

AITakeControlsAction

Changes control of the users' plane between user and AI.

SendMessageToAIAction

Currently useless

Not tested

AttachDroppablePayloadAction

AttachEffectAction

ChangeObjectTypeAction

CustomAction

DisqualifyPlayerAction

FailureAction

TimelineAction

OneShotSoundAction

PlayAnimationAction

PlaySoundAction

PlayBlendTreeStateAction

PlayFlightRecordingAction

PlayListAction

PlayReplayAction

RaceClockStartAction

RaceClockActivateAction

RefillAction

RTPCAction

RumbleAction

SpawnAction

StopSoundAction

TimePenaltyAction

SoundEffectAction

ChangeRopeLinkAction