Logic sequence: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
Line 1: Line 1:
{{this is a|name=logic_sequence|e0|sprite=1|game=mapbase|game1=p2ce}} It is a variant of {{ent|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.
{{this is a|point entity|name=logic_sequence|sprite=1|game=Mapbase|game1=Portal 2: Community Edition}} It is a variant of {{ent|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==
==Keyvalues==

Revision as of 19:55, 17 May 2024

Logic sequence.png

logic_sequence is a point entity available in Mapbase Mapbase and Portal 2: Community Edition Portal 2: Community Edition. 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

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 or OnCaseFail based on whether this value matches the InValue parameter.
Suppress auto increment (DontIncrementOnPass) <boolean>
Prevents automatically incrementing the sequence each time a case passes.)


Inputs

InValue <stringRedirectInput/string>
Compares the Input value to the current case's value, firing the appropriate output or progresses the sequence if needed.
SetCurrentCase <integerRedirectInput/integer>
Sets the sequence's current case. This will fire OutCurCase.
SetCurrentCaseNoFire <integerRedirectInput/integer>
Sets the sequence's current case without firing OutCurCase.
IncrementSequence <integerRedirectInput/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 <integerRedirectInput/integer>
Fires each time the sequence's current case value changes, e.g. when it's incremented by a passing case.
OnCasePass <stringRedirectInput/string>
Fires when a case is matched, passing the input value.
OnCaseFail <stringRedirectInput/string>
Fires when a case fails, passing the input value.
OnSequenceComplete <stringRedirectInput/string>
Fires when the last case is matched and the sequence is complete.