SimMission.Latched
From FSDeveloper Wiki
SimMission.Latched tests for the latched state of another trigger.
Latched is the state of a trigger once fired.
SimMission.Latched should not be used for time-critical dependencies.
As with all Property Triggers, there may be some time-delay before the condition is tested & fed back.
I've observed delays > 10 seconds after the initiating event occured.
Not all triggers can be monitored for latched.
Triggers set to Oneshot = False, will report as unlatched.
Example
Uses SimMission.Latched to monitor the state of a timer trigger.
A timer activates the first dialog.
A second timer activates the property trigger which checks for the first timer's SimMission.Latched state.
If fired, a second dialog is activated.
Sample Code
<SimMission.DialogAction InstanceId="{D3BDAB41-B690-499F-B63D-1ECDAB56C1AA}"> <Descr>_Init_TTIMER_S5_DIALOG_AD_Start</Descr> <Text>Start - Timer activated dialog</Text> <SoundFileName>Windows XP Logon Sound.wav</SoundFileName> </SimMission.DialogAction>
<SimMission.DialogAction InstanceId="{7808D1CE-FFDB-4727-A05E-093DB452DB0C}"> <Descr>_Init_TTIMER_S5_State_Latched_Test_DIALOG_AD_TaDa</Descr> <Text>TaDa - Result of Timer SimMission.Latched activated dialog</Text> <SoundFileName>TaDa.wav</SoundFileName> </SimMission.DialogAction>
<SimMission.ObjectActivationAction InstanceId="{35CE0E66-F666-4E9C-8CCD-929C54BCE3C7}"> <Descr>Check_Trigger_Latched_TPROP_AA_On</Descr> <ObjectReferenceList> <ObjectReference id="_Init_TTIMER_S5_State_Latched_Test_DIALOG_AD_TaDa" InstanceId="{501830EF-64BE-455E-813E-849BE93FD9F0}"> </ObjectReference> </ObjectReferenceList> </SimMission.ObjectActivationAction>
<SimMission.PropertyTrigger InstanceId="{501830EF-64BE-455E-813E-849BE93FD9F0}"> <Descr>Test_Trigger_State_Latched_TPROP</Descr> <Activated>False</Activated> <Condition> <And> <Equal> <LHS> <Property> <Name>SimMission.Latched</Name> <ObjectReference id="Init_TTIMER_S5" InstanceId="{DBE3913D-7B7C-45FE-A62B-54588F875D76}"> </ObjectReference> </Property> </LHS> <RHS> <Constant> <Bool>True</Bool> </Constant> </RHS> </Equal> </And> </Condition> <Actions> <ObjectReference id="_Init_TTIMER_S5_DIALOG_AD_Start" InstanceId="{7808D1CE-FFDB-4727-A05E-093DB452DB0C}"> </ObjectReference> </Actions> </SimMission.PropertyTrigger>
<SimMission.TimerTrigger InstanceId="{0819441F-C161-4659-B615-8F20985DA660}"> <Descr>Init_TTIMER_S10</Descr> <StopTime>10.000</StopTime> <Actions> <ObjectReference id="Test_Trigger_State_Latched_TPROP_AA_On" InstanceId="{35CE0E66-F666-4E9C-8CCD-929C54BCE3C7}"> </ObjectReference> </Actions> </SimMission.TimerTrigger>
<SimMission.TimerTrigger InstanceId="{DBE3913D-7B7C-45FE-A62B-54588F875D76}"> <Descr>Init_TTIMER_S5</Descr> <StopTime>5.000</StopTime> <Actions> <ObjectReference id="_Init_TTIMER_S5_DIALOG_AD_Start" InstanceId="{D3BDAB41-B690-499F-B63D-1ECDAB56C1AA}"> </ObjectReference> </Actions> </SimMission.TimerTrigger>