Logic sequence: Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV Targetname}} | |||
{{KV|Start Disabled|intn=StartDisabled|boolean|If this entity is disabled, it will not accept any case tests. It will still accept other inputs, like <code>SetCurrentCase</code>.}} | {{KV|Start Disabled|intn=StartDisabled|boolean|If this entity is disabled, it will not accept any case tests. It will still accept other inputs, like <code>SetCurrentCase</code>.}} | ||
{{KV|Initial Case|intn=InitialCase|integer|Which case to start on, meaning inputs will initially compare with this case. Uses the case's index. (e.g. 4 for Case 04)}} | {{KV|Initial Case|intn=InitialCase|integer|Which case to start on, meaning inputs will initially compare with this case. Uses the case's index. (e.g. 4 for Case 04)}} | ||
{{KV|Case 01|to=Case 16|intn=Case##|string|The values to test against. The current case fires <code>OnCasePass</code> or <code>OnCaseFail</code> based on whether this value matches the <code>InValue</code> parameter.}} | {{KV|Case 01|to=Case 16|intn=Case##|string|The values to test against. The current case fires <code>OnCasePass</code> or <code>OnCaseFail</code> based on whether this value matches the <code>InValue</code> parameter.}} | ||
{{KV|Suppress auto increment|intn=DontIncrementOnPass|boolean|Prevents automatically incrementing the sequence each time a case passes.)}} | {{KV|Suppress auto increment|intn=DontIncrementOnPass|boolean|Prevents automatically incrementing the sequence each time a case passes.)}} | ||
==Inputs== | ==Inputs== | ||
{{ | {{I|InValue|Compares the Input value to the current case's value, firing the appropriate output or progresses the sequence if needed.|param=string}} | ||
{{ | {{I|SetCurrentCase|Sets the sequence's current case. This will fire <code>OutCurCase</code>.|param=integer}} | ||
{{ | {{I|SetCurrentCaseNoFire|Sets the sequence's current case without firing <code>OutCurCase</code>.|param=integer}} | ||
{{ | {{I|IncrementSequence|Increments the current case by the specified number. (1 if blank)|param=integer}} | ||
{{ | {{I|ResetSequence|Resets the sequence to Case 01.|param=void}} | ||
{{I EnableDisable}} | {{I EnableDisable}} | ||
{{I Toggle}} | {{I Toggle}} | ||
==Outputs== | ==Outputs== | ||
{{ | {{O|OutCurCase|Fires each time the sequence's current case value changes, e.g. when it's incremented by a passing case.|param=integer}} | ||
{{ | {{O|OnCasePass|Fires when a case is matched, passing the input value.|param=string}} | ||
{{ | {{O|OnCaseFail|Fires when a case fails, passing the input value.|param=string}} | ||
{{ | {{O|OnSequenceComplete|Fires when the last case is matched and the sequence is complete.|param=string}} | ||
Latest revision as of 02:08, 26 September 2024

logic_sequence
is a point entity available in Mapbase and
Strata Source. It is a variant of logic_case which treats the cases as a linear sequence ordered from 1-16, progressing from one case to the next by comparing input values against a current one. This is useful for situations where the player needs to input a combination of numbers or letters, like the password for a keypad.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Start Disabled (StartDisabled) <boolean>
- If this entity is disabled, it will not accept any case tests. It will still accept other inputs, like
SetCurrentCase
.
- Initial Case (InitialCase) <integer>
- Which case to start on, meaning inputs will initially compare with this case. Uses the case's index. (e.g. 4 for Case 04)
- Case 01 (Case##) to Case 16 <string>
- The values to test against. The current case fires
OnCasePass
orOnCaseFail
based on whether this value matches theInValue
parameter.
- Suppress auto increment (DontIncrementOnPass) <boolean>
- Prevents automatically incrementing the sequence each time a case passes.)
Inputs
- InValue <string >
- Compares the Input value to the current case's value, firing the appropriate output or progresses the sequence if needed.
- SetCurrentCase <integer >
- Sets the sequence's current case. This will fire
OutCurCase
.
- SetCurrentCaseNoFire <integer >
- Sets the sequence's current case without firing
OutCurCase
.
- IncrementSequence <integer >
- Increments the current case by the specified number. (1 if blank)
- ResetSequence <void>
- Resets the sequence to Case 01.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Toggle:
- Toggle
- Toggle the enabled/disabled status of this entity.
Outputs
- OutCurCase <integer >
- Fires each time the sequence's current case value changes, e.g. when it's incremented by a passing case.
- OnCasePass <string >
- Fires when a case is matched, passing the input value.
- OnCaseFail <string >
- Fires when a case fails, passing the input value.
- OnSequenceComplete <string >
- Fires when the last case is matched and the sequence is complete.