MSFS Mission Script - Actions
This page is a work-in-progress. Generic message - Please note some detail may possibly be missing or incorrect. |
Applicable |
---|
MSFS |
MS Flight |
LM P3D5 |
LM P3D4 |
LM P3D3 |
LM P3D2 |
LM P3D |
FS World |
FSXSE |
FSXA |
FSX |
FS2004 |
FS2002 |
XP11 |
XP10 |
XP9 |
Actions are mission functions that perform various tasks, such as activating objects, executing code, controlling timers, playing sounds, triggering events, and shaping the flow of the mission. See MSFS Mission Script for general information about creating a mission script.
Contents
Action queue
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.
Common actions
ObjectActivationAction, DialogAction, ChangeAssistanceItemAction, FailureAction, AdjustPayloadAction, RefillAction, FlowStateAction.
General attributes
Actions have a few general attributes:
Immediate
False: This action will wait for prior action in the action queue 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 Actions section of the element in the mission .xml.
True: This action will ignore the action queue and start immediately.
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} |
Mission logic
ObjectActivationAction
Very useful action to (de)activate objects such as triggers and InGameMarkers.
RandomAction
Randomly executes one action from a list. First, the action has a probability that any action is executed at all. If it does execute, it randomly chooses one action that will execute.
ExecuteRPNAction
Execute RPN code.
SkipAction
Skip an action.
StopObjectActionQueueAction
Stop action queues of referenced objects
ExecuteListAction
Execute a list of action
WaitAction
Action that does nothing... for a predefined time. You can use this to delay the next items in an actionQeue.
CountAction
Changes the count of a CounterTrigger
ResetTimerAction
Reset the timer to the StartTime.
TimerAdjustAction
Adjusts the time of a TimerTrigger up or down.
GoalResolutionAction & SubGoalResolutionAction
Changes the state of a (sub)goal.
GrantRewardAction
Untested.
PointOfInterestActivationAction
(De)activates a point of interest
POIChangeModelAction
Unknown.
Sound
DialogAction
Plays dialog for the copilot and atc. It can use sound files or text-to-speech (TTS). The dialogAction can also show subtitles.
InstructorDialogAction
Same as a DialogAction, but allows for a male and female voice, depending on the player's selected instructor in the settings.
OneShotSoundAction
Plays specified sound file. Doesn't seem to work in MSFS.
PlayListAction
Plays through a list of sound files. Doesn't seem to work in MSFS.
PlaySoundAction
Play a sound in 3D space. Uses a WWise event.
StopSoundAction
Stop a sound.
SoundEffectAction
Sets sound effects. Doesn't seem to work in MSFS.
RTPCAction
Send a WWise RTPC.
Player/Aircraft
ChangeAssistanceItemAction
Changes specific assistance items throughout the mission.
FailureAction
Fail a system (e.g., fuel pump, gear, altimeter, radios).
AdjustPayloadAction
Set or adjust the weight on a payload station (weight of pilot, passengers, baggage, etc).
RefillAction
Add or subtract percent of a substance (e.g., fuel).
ChangeObjectTypeAction
Change an object to a different type.
RequestTeleportAction
Request a teleport.
RequestTeleportCameraAction
Teleport current camera to a position given in a CFG file (e.g, close instrument view, wide cockpit view, gear view).
SkipTimeAction
Very cool action allowing you to speed up or skip time without affecting the simulation. It will speed up cloud movement and the day-night cycle, but keep the planes, other vehicles, and animations at the normal speed.
AITakeControlsAction
Changes control of the users' plane between user and AI.
SendMessageToAIAction
Currently useless for missions. See documentation.
ActivateWaypointsAction
Send waypoints to a Simobject for the AI to follow.
WaypointsFromAnotherWaypointAction
Get waypoint list for another ActivateWaypointsAction.
PlayFlightRecordingAction
Plays back recording for the AirplanePlaybackAI.
SpawnAction
Flowstate
FlowEventAction
FlowStateAction
TimerTriggerFlowStateAction
TransitionAction
ToggleVisibilityAction
Event
EventTriggerActivationAction
EventTriggerAction
EventAction
Animation / effects / RTC
FadeToColorAction
Fades a color over the whole viewport. Useful for teleports and testing.
AttachEffectAction
Attach a visual effect to an object (e.g., plane, simobject).
PlayAnimationAction
Play an animation.
PlayBlendTreeStateAction
Play a blend tree state.
RTCLocationsPreloadAction
Replay
RecordReplayAction
Record a new replay and store in file.
PlayReplayAction
Play a replay file.
PlayGhostAction
Play a ghost replay.
Race
DisqualifyPlayerAction
Disqualify a player.
RaceCourseActivateAction
Enable race course progress for all players.
RaceClockStartAction
Start the global race timer for all players.
TimePenaltyAction
Give a player a time penalty/bonus.
BackOnTrackAction
When a crash occurs in a race course, the crash is 'not allowed' and the player is teleported to the pylon before his crash.
Other
FocusInstrumentAction
Focus the camera on a specific instrument. You can highlight the instrument as well (blue glow).
RumbleAction
Controller rumble effect.
CustomAction
Create a custom action that uses an external program connected with simconnect.
ChangeMarkerTemplateAction
Change marker template.
ChangeRopeLinkAction
Change link on ropes.
ChangeNodeAction
Change node property (e.g. hide the yoke).
AttachDroppablePayloadAction
Attach a droppable payload.
AgentMessageAction
Send or reveive a message from an agent (ATC?).
MissionScoreToLeaderboardAction
Try to send mission score to leaderboard. Not (yet) supported for unofficial missions.
ShowLogbookAction
Show the logbook.
FilterInputKeyAction
Change input key processing (e.g. turn of the input key for the elevator).
- Flightplan
- Weather definitions
- Flight file
- Mission script
- Triggers
- Actions
- ObjectActivationAction · DialogAction · AdjustPayloadAction · ChangeAssistanceItemAction · FadeToColorAction · RandomAction · RequestTeleportAction · CountAction · ResetTimerAction · TimerAdjustAction · GoalResolutionAction & SubGoalResolutionAction · GrantRewardAction · PointOfInterestActivationAction · ActivateWaypointsAction · AITakeControlsAction · SendMessageToAIAction
- Mission objects
- Calculator
- Flow states
- Events
- Areas
- Library objects
- Sim objects
- RTC