Random Action

From FSDeveloper Wiki
Jump to navigationJump to search


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.

RandomAction

Randomly execute action(s).


ProbabilityPercent Propability that one of the actions will execute. 100% means a random action from the list will always execute.
Actions You can reference an action multiple times to increase its probability.

Possible uses

  • Create different experiences (different dialog, random failures, random location to go to)
  • Have something randomly occur in a timespan. Set the ProbabilityPercent to a low value and have a TimerTrigger trigger the RandomAction multiple times. The ProbabilityPercent and frequency of the TimerTrigger will determine the timespan.

Related

See MSFS Mission Script - Actions for an overview of actions and more info about actions in general.


Pages relevant to mission creation for MSFS.

Mission structure

Flightplan
Weather definitions
Flight file
Mission script
Triggers
AirportLandingTrigger & AreaLandingTrigger · CounterTrigger · PropertyTrigger · ProximityTrigger · TimerTrigger
Actions
ObjectActivationAction · DialogAction · AdjustPayloadAction · ChangeAssistanceItemAction · FadeToColorAction · RandomAction · RequestTeleportAction · CountAction · ResetTimerAction · TimerAdjustAction · GoalResolutionAction & SubGoalResolutionAction · GrantRewardAction · PointOfInterestActivationAction · ActivateWaypointsAction · AITakeControlsAction · SendMessageToAIAction
Mission objects
Mission definition · Goal · LivingWorldExclusion · Camera
Calculator
Flow states
Events
Areas
Rectangle Area · Cylinder Area · Polygon Area · Corridor Area · InGameMarker
Library objects
Sim objects
RTC

Mission tools

MSFS Script Editor · BushTripInjector · BushMissionGen · MSFSLocalizer · SPB2XML · Little Navmap

Other

Example mission files
Porting FSX Missions to MSFS
Localisation
Click the links to access the topic pages (Default - Opens in same window).