Counter Trigger: Difference between revisions
From FSDeveloper Wiki
Jump to navigationJump to search
m (Test table of contents) |
m (Added links, removed test) |
||
| Line 21: | Line 21: | ||
| XP9 = false | | XP9 = false | ||
}} | }} | ||
Has a counter that can be changed by a CountAction. It fires when a specific count has been reached. | Has a counter that can be changed by a [[Count_Action|CountAction]]. It fires when a specific count has been reached. | ||
{{Infobox-MSFS-Script-Element | {{Infobox-MSFS-Script-Element | ||
| Line 38: | Line 38: | ||
{{Infobox-MSFS-Script-Element-End}} | {{Infobox-MSFS-Script-Element-End}} | ||
The Count Action adds the specified value to an associated Counter trigger. When the Counter | The [[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 can also associate more than one Count action with a single Counter trigger. | 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 can also associate more than one Count action with a single Counter trigger. | ||
== Possible uses == | == Possible uses == | ||
| Line 45: | Line 45: | ||
* Limiting how many times the player can exceed the speed. | * Limiting how many times the player can exceed the speed. | ||
== | == Related elements and alternatives == | ||
* You have to link the trigger to at least one [[Count_Action|CountAction]] | |||
* You can use [[MSFS Mission Script - Calculator|Calculators]] for more complex logic. | * You can use [[MSFS Mission Script - Calculator|Calculators]] for more complex logic. | ||
* You can set [[Property Trigger|property triggers]] to fire for instance when the speed has been exceeded for a total of 20 seconds. | * You can set [[Property Trigger|property triggers]] to fire for instance when the speed has been exceeded for a total of 20 seconds. | ||
Revision as of 14:22, 6 October 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 |
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 |
The 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 can also associate more than one Count action with a single Counter trigger.
Possible uses
- Count the number of targets the player has hit.
- Limiting how many times the player can exceed the speed.
Related elements and alternatives
- 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.