MSFS Mission Script - Actions: Difference between revisions
(Add links) |
(Added missing actions, changed categorisation, and added descriptions to most actions) |
||
| Line 21: | Line 21: | ||
| XP9 = false | | XP9 = false | ||
}} | }} | ||
{{:Transclusion_MSFS_Mission_Script}} | |||
== 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. | 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 == | |||
[[Object Activation Action|ObjectActivationAction]], [[Dialog Action|DialogAction]], [[Change Assistance Item Action|ChangeAssistanceItemAction]], [[Failure Action|FailureAction]], [[Adjust Payload Action|AdjustPayloadAction]], [[Refill Action|RefillAction]], [[MSFS_Mission_Script_-_Flow_states#FlowStateAction|FlowStateAction]]. | |||
== General attributes == | == General attributes == | ||
Actions have a few general attributes: | Actions have a few general attributes: | ||
=== Immediate === | === Immediate === | ||
'''True:''' This action will start immediately | '''True:''' This action will start immediately<br> | ||
'''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. | '''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 === | === BreakOnExecute === | ||
Official description: "Code break if action is executed". Not sure what that means | Official description: "Code break if action is executed". Not sure what that means | ||
=== TargetPlayer === | === 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: | 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: | ||
| Line 51: | Line 53: | ||
|} | |} | ||
== | == Mission logic == | ||
==== [[Object Activation Action|ObjectActivationAction]] ==== | ==== [[Object Activation Action|ObjectActivationAction]] ==== | ||
Very useful action to (de)activate objects such as triggers and InGameMarkers. | Very useful action to (de)activate objects such as triggers and InGameMarkers. | ||
==== [[Random Action|RandomAction]] ==== | ==== [[Random Action|RandomAction]] ==== | ||
Chooses a random action from a list and can have a probability that an action executes. | Chooses a random action from a list and can have a probability that an action executes. | ||
==== | ==== 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 pause the actionQeue. | |||
== Actions related to a trigger == | == Actions related to a trigger == | ||
==== [[Count Action|CountAction]] ==== | ==== [[Count Action|CountAction]] ==== | ||
Changes the count of a [[Counter_Trigger|CounterTrigger]] | Changes the count of a [[Counter_Trigger|CounterTrigger]] | ||
==== [[Reset Timer Action|ResetTimerAction]] ==== | ==== [[Reset Timer Action|ResetTimerAction]] ==== | ||
Reset the timer to the StartTime. | |||
==== [[Timer Adjust Action|TimerAdjustAction]] ==== | ==== [[Timer Adjust Action|TimerAdjustAction]] ==== | ||
Adjusts the time of a [[Timer Trigger|TimerTrigger]] up or down. | |||
== Action related to [[MSFS Mission Script - Mission objects|Mission objects]] == | == Action related to [[MSFS Mission Script - Mission objects|Mission objects]] == | ||
| Line 92: | Line 84: | ||
==== [[Point Of Interest Activation Action|PointOfInterestActivationAction]] ==== | ==== [[Point Of Interest Activation Action|PointOfInterestActivationAction]] ==== | ||
(De)activates a [[point of interest]] | (De)activates a [[point of interest]] | ||
==== POIChangeModelAction ==== | |||
Unknown. | |||
== Sound == | |||
==== [[Dialog Action|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. | |||
==== PlayListAction ==== | |||
Plays through a list of sound files. | |||
==== PlaySoundAction ==== | |||
Play a sound in 3D space. | |||
==== StopSoundAction ==== | |||
Stop a sound. | |||
==== SoundEffectAction ==== | |||
Sets sound effects. | |||
==== RTPCAction ==== | |||
Send a WWise RTPC. | |||
== Player/Aircraft == | |||
==== [[Change Assistance Item Action|ChangeAssistanceItemAction]] ==== | |||
Changes specific assistance items throughout the mission. | |||
==== [[Failure Action|FailureAction]] ==== | |||
Fail a system (e.g., fuel pump, gear, altimeter, radios). | |||
==== [[Adjust Payload Action|AdjustPayloadAction]] ==== | |||
Set or adjust the weight on a payload station (weight of pilot, passengers, baggage, etc). | |||
==== [[Refill Action|RefillAction]] ==== | |||
Add or subtract percent of a substance (e.g., fuel). | |||
==== ChangeObjectTypeAction ==== | |||
Change an object to a different type. | |||
==== [[Request Teleport Action|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 ==== | |||
Skip time. | |||
== Action related to AI / Simobjects == | == Action related to AI / Simobjects == | ||
==== [[AI Take Controls Action|AITakeControlsAction]] ==== | ==== [[AI Take Controls Action|AITakeControlsAction]] ==== | ||
Changes control of the users' plane between user and AI. | Changes control of the users' plane between user and AI. | ||
==== [[Send Message To AI Action|SendMessageToAIAction]] ==== | ==== [[Send Message To AI Action|SendMessageToAIAction]] ==== | ||
Currently useless for missions. See [https://docs.flightsimulator.com/html/Content_Configuration/Environment/Living_World/Airport_Services/Service_And_IdleWorker_Script_Definitions.htm?rhhlterm=sendmessagetoaiaction#h2 documentation]. | Currently useless for missions. See [https://docs.flightsimulator.com/html/Content_Configuration/Environment/Living_World/Airport_Services/Service_And_IdleWorker_Script_Definitions.htm?rhhlterm=sendmessagetoaiaction#h2 documentation]. | ||
==== [[Activate Waypoints Action|ActivateWaypointsAction]] ==== | |||
Send waypoints to a [[Simobject]] for the AI to follow. | |||
==== WaypointsFromAnotherWaypointAction ==== | |||
Get waypoint list for another ActivateWaypointsAction. | |||
==== PlayFlightRecordingAction ==== | |||
Plays back recording for AI aircraft. | |||
==== SpawnAction ==== | |||
== [[MSFS_Mission_Script_-_Flow_states|Flowstate]] == | |||
==== FlowEventAction ==== | |||
==== FlowStateAction ==== | |||
==== TimerTriggerFlowStateAction ==== | |||
==== TransitionAction ==== | |||
==== ToggleVisibilityAction ==== | |||
== [[MSFS_Mission_Script_-_Events|Event]] == | |||
==== EventTriggerActivationAction ==== | |||
==== EventTriggerAction ==== | |||
==== EventAction ==== | |||
== | == Animation / effects / RTC == | ||
==== | ==== [[Fade To Color Action|FadeToColorAction]] ==== | ||
Fades a color over the whole viewport. Useful for teleports and testing. | |||
==== AttachEffectAction ==== | ==== AttachEffectAction ==== | ||
Attach a visual effect to an object (e.g., plane, simobject). | |||
==== PlayAnimationAction ==== | ==== PlayAnimationAction ==== | ||
Play an animation. | |||
==== PlayBlendTreeStateAction ==== | ==== PlayBlendTreeStateAction ==== | ||
==== | Play a blend tree state. | ||
==== | ==== RTCLocationsPreloadAction ==== | ||
== Replay == | |||
==== RecordReplayAction ==== | |||
Record a new replay and store in file. | |||
==== PlayReplayAction ==== | ==== PlayReplayAction ==== | ||
Play a replay file. | |||
==== PlayGhostAction ==== | |||
Play a ghost replay. | |||
== Race == | |||
==== DisqualifyPlayerAction ==== | |||
Disqualify a player. | |||
==== RaceCourseActivateAction ==== | |||
Enable race course progress for all players. | |||
==== RaceClockStartAction ==== | ==== 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 isntrument as well. | |||
==== RumbleAction ==== | ==== RumbleAction ==== | ||
==== | Controller rumble effect. | ||
==== CustomAction ==== | |||
==== | Create a custom action that uses an external program connected with simconnect. | ||
==== ChangeMarkerTemplateAction ==== | |||
Change marker template. | |||
==== ChangeRopeLinkAction ==== | ==== ChangeRopeLinkAction ==== | ||
Change link on ropes. | |||
==== ChangeNodeAction ==== | |||
Change node property. | |||
==== 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. | |||
{{Template:Navbox-Mission-Creation-MSFS}} | {{Template:Navbox-Mission-Creation-MSFS}} | ||
Revision as of 09:12, 20 November 2021
| 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 |
See MSFS Mission Script for general information about creating a mission script.
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
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} |
Mission logic
ObjectActivationAction
Very useful action to (de)activate objects such as triggers and InGameMarkers.
RandomAction
Chooses a random action from a list and can have a probability that an action executes.
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 pause the 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.
PlayListAction
Plays through a list of sound files.
PlaySoundAction
Play a sound in 3D space.
StopSoundAction
Stop a sound.
SoundEffectAction
Sets sound effects.
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
Skip time.
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 AI aircraft.
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 isntrument as well.
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.
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.
- 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