Skip to main content

logic_case

logic_case icon

Point Entity

Compares an input to up to 32 preset values. If the input value is the same as any of the preset values, an output corresponding to that value is fired.

For example: if Case01 is set to 2 and Case02 is set to 5, and the input value is 5, the OnCase02 output will be fired.

This entity can also be used to select from a number of random targets via the PickRandom input. One of the OnCase outputs that is connected to another entity will be picked at random and fired.

Keyvalues

  • Entity Scripts (vscripts) <ScriptList>
    Name(s) of script files that are executed after all entities have spawned.

  • Name (targetname) <TargetSource>
    The name that other entities refer to this entity by.

  • Case 01 (Case01) <String>

  • Case 02 (Case02) <String>

  • Case 03 (Case03) <String>

  • Case 04 (Case04) <String>

  • Case 05 (Case05) <String>

  • Case 06 (Case06) <String>

  • Case 07 (Case07) <String>

  • Case 08 (Case08) <String>

  • Case 09 (Case09) <String>

  • Case 10 (Case10) <String>

  • Case 11 (Case11) <String>

  • Case 12 (Case12) <String>

  • Case 13 (Case13) <String>

  • Case 14 (Case14) <String>

  • Case 15 (Case15) <String>

  • Case 16 (Case16) <String>

  • Case 17 (Case17) <String>

  • Case 18 (Case18) <String>

  • Case 19 (Case19) <String>

  • Case 20 (Case20) <String>

  • Case 21 (Case21) <String>

  • Case 22 (Case22) <String>

  • Case 23 (Case23) <String>

  • Case 24 (Case24) <String>

  • Case 25 (Case25) <String>

  • Case 26 (Case26) <String>

  • Case 27 (Case27) <String>

  • Case 28 (Case28) <String>

  • Case 29 (Case29) <String>

  • Case 30 (Case30) <String>

  • Case 31 (Case31) <String>

  • Case 32 (Case32) <String>

Inputs

  • RunScriptFile <String>
    Load and execute a script file

  • RunScriptCode <String>
    Execute a fragment of script code

  • CallScriptFunction <String>
    Call a script function

  • CallPrivateScriptFunction <String>
    Calls a script function from this entity's private script scope.

  • CallGlobalScriptFunction <String>
    Calls a script function in the global script scope.

  • Kill <Void>
    Removes this entity from the world.

  • KillHierarchy <Void>
    Removes this entity and all its children from the world.

  • KillConstrained <Void>
    Removes this entity, all its children, and anything constrained to it, from the world.

  • AddOutput <String>
    Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care.

  • FireUser1 <Void>
    Causes this entity's OnUser1 output to be fired.

  • FireUser2 <Void>
    Causes this entity's OnUser2 output to be fired.

  • FireUser3 <Void>
    Causes this entity's OnUser3 output to be fired.

  • FireUser4 <Void>
    Causes this entity's OnUser4 output to be fired.

  • InValue <String>
    Compares the Input value to the case values, and fires the appropriate output, if any.

  • PickRandom <Void>
    Fires a random OnCase output with at least one connection.

  • PickRandomShuffle <Void>
    Fires a random OnCase output with at least one connection, with no repeats until all cases have been picked, at which point the shuffle starts over.

  • ResetShuffle <Void>
    Starts the shuffle over so that the next PickRandomShuffle can select from all cases.

Outputs

  • OnUser1 <Void>
    Fired in response to FireUser1 input.

  • OnUser2 <Void>
    Fired in response to FireUser2 input.

  • OnUser3 <Void>
    Fired in response to FireUser3 input.

  • OnUser4 <Void>
    Fired in response to FireUser4 input.

  • OnKilled <Void>
    Fired when the entity is killed and removed from the game. Parameter is the inflictor.

  • OnDefault <Void>
    Fired when the input value does not equal any of the Case values.

  • OnCase01 <Void>
    Fired when the input value equals the Case01 value.

  • OnCase02 <Void>
    Fired when the input value equals the Case02 value.

  • OnCase03 <Void>
    Fired when the input value equals the Case03 value.

  • OnCase04 <Void>
    Fired when the input value equals the Case04 value.

  • OnCase05 <Void>
    Fired when the input value equals the Case05 value.

  • OnCase06 <Void>
    Fired when the input value equals the Case06 value.

  • OnCase07 <Void>
    Fired when the input value equals the Case07 value.

  • OnCase08 <Void>
    Fired when the input value equals the Case08 value.

  • OnCase09 <Void>
    Fired when the input value equals the Case09 value.

  • OnCase10 <Void>
    Fired when the input value equals the Case10 value.

  • OnCase11 <Void>
    Fired when the input value equals the Case11 value.

  • OnCase12 <Void>
    Fired when the input value equals the Case12 value.

  • OnCase13 <Void>
    Fired when the input value equals the Case13 value.

  • OnCase14 <Void>
    Fired when the input value equals the Case14 value.

  • OnCase15 <Void>
    Fired when the input value equals the Case15 value.

  • OnCase16 <Void>
    Fired when the input value equals the Case16 value.

  • OnCase17 <Void>
    Fired when the input value equals the Case17 value.

  • OnCase18 <Void>
    Fired when the input value equals the Case18 value.

  • OnCase19 <Void>
    Fired when the input value equals the Case19 value.

  • OnCase20 <Void>
    Fired when the input value equals the Case20 value.

  • OnCase21 <Void>
    Fired when the input value equals the Case21 value.

  • OnCase22 <Void>
    Fired when the input value equals the Case22 value.

  • OnCase23 <Void>
    Fired when the input value equals the Case23 value.

  • OnCase24 <Void>
    Fired when the input value equals the Case24 value.

  • OnCase25 <Void>
    Fired when the input value equals the Case25 value.

  • OnCase26 <Void>
    Fired when the input value equals the Case26 value.

  • OnCase27 <Void>
    Fired when the input value equals the Case27 value.

  • OnCase28 <Void>
    Fired when the input value equals the Case28 value.

  • OnCase29 <Void>
    Fired when the input value equals the Case29 value.

  • OnCase30 <Void>
    Fired when the input value equals the Case30 value.

  • OnCase31 <Void>
    Fired when the input value equals the Case31 value.

  • OnCase32 <Void>
    Fired when the input value equals the Case32 value.