Counter Trigger

From FSDeveloper Wiki
Revision as of 12:48, 25 May 2024 by BASys (talk | contribs) (Replaced Applicable-FSVersion for MSFS with MSFS2020, added MSFS2024)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Has a counter that can be changed by a CountAction. It fires when a specific count has been reached.

CounterTrigger

Fires when a counter reaches a specified target.


StartCount Initial value for the counter
StopCount Value for the counter at which the trigger fires
Counter Current value for the counter

A Count Action adds the specified value to an associated Counter trigger. When the Counter trigger’s StopCount value is reached, the trigger will fire and initiate the associated actions. You can count down instead of up, but there isn’t really any reason to do so. You have to link at least one CountAction with the Counter trigger.

Possible uses

  • Count the number of targets the player has hit.
  • Limiting how many times the player can exceed the speed.

Related

  • You have to link the trigger to at least one CountAction
  • You can use Calculators for more complex logic.
  • You can set property triggers to fire for instance when the speed has been exceeded for a total of 20 seconds.


See MSFS Mission Script - Triggers for an overview of triggers and more info about triggers 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).