Changes

no edit summary
Line 1: Line 1: −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">This constraint allows or prevents a macro/feature from running based on the current torch (flashlight) state.</pre>
This constraint can be used to allow/prevent actions being run depending on the current state of the torch.
+
 
</pre>
+
''' Options '''
 +
 
 +
* '''Torch On''': Constraint passes only when the torch is on
 +
* '''Torch Off''': Constraint passes only when the torch is off
 +
 
 +
''' Example '''
 +
 
 +
''Example 1: Toggle the torch state when a StopWatch hits 1 minute''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Stopwatch (Torch toggler)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
If (Torch On)
 +
  Torch On/Off (Turn Off)
 +
  Speak Text("Torch Off")
 +
Else
 +
  Torch On/Off (Turn On)
 +
  Speak Text("Torch On")
 +
ENDIF
 +
 
 +
StopWatch Reset and Restart (Torch Toggler)</pre>
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger: Torch On/Off|Torch On/Off Trigger]]
 +
* [[Action: Torch On/Off|Torch On/Off Action]]