This article relates to the game "Portal 2." Click here for more information.

Comp numeric transition: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
m (Substituted IO templates)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{P2CE topicon}}
{{P2CE topicon}}
{{infotable
{{this is a|point entity|internal=1|sprite=1|name=comp_numeric_transition|game=Strata Source|game1=TeamSpen's Hammer Addons}}
|comp_numeric_transition
 
|img=[[File:Comp numeric transition.png]]
It changes a keyvalue or input over time with various options, when triggered.
|type=e1
 
|engine=2
==KeyValues==
|in={{teamspen|4}}
{{KV|Start Disabled|choices}}
}}
:*0: No
{{this is a|point entity|internal=1|name=comp_numeric_transition|game=Portal 2: Community Edition}}  
:*0: Yes
{{Multipage}}
{{KV|Entity to Control|target_destination|The entity to which the outputs will be directed to.}}
{{KV|Keyvalue/Input Name|string|The name of the keyvalue or input to change. If the target is not an entity findable by the [[postcompiler]], IO Type must be set.}}
{{KV|I/O Type|choices|The method used to control an entity. If Input, use the input name provided. If KeyValue, use the AddOutput to change the keyvalue. If Auto, examine the entity class that is being controlled to determine the appropriate mode.}}
:*auto: Automatic
:*io: Input
:*kv: KeyValue (AddOutput)
{{KV|Value Type|choices|The behaviour of the input, used to control what actual values are sent. Regardless of this value, the other options are 'position'-type values!}}
:*set: Instantly Set
:*moveto: Move to value
:*speed: Adjust Speed
:*light: Light Pattern
{{KV|Beat Interval|float|Time between each output. Smaller values are more accurate but increase the outputs generated.}}
{{KV|Start Delay|float|Wait this amount of time after being triggered before animating.}}
{{KV|Duration|float|Time the change will take.}}
{{KV|Start Value|float|Starting value. If the Value Type is Light Pattern, these may be a-z letters.}}
{{KV|Ending Value|float|Ending value. If the Value Type is Light Pattern, these may be a-z letters.}}
{{KV|Easing Start|choices|Controls how the animation begins.}}
:*linear: None
:*quad: Quadratic (x^2)
:*cubic: Cubic (x^3)
:*quartic: Quartic (x^4)
:*sine: Sinusoidal
{{KV|Easing End|choices|Controls how the animation ends.}}
:*linear: None
:*quad: Quadratic (x^2)
:*cubic: Cubic (x^3)
:*quartic: Quartic (x^4)
:*sine: Sinusoidal
{{KV Targetname}}
 
==Flags==
{{Fl|1|Only trigger once}}
{{Fl|2|Allow fast retrigger}}
 
==Inputs==
{{I|Enable|Allows the relay to fire the OnTrigger outputs after being disabled.}}
{{I|Disable|Prevents the relay from firing OnTrigger outputs in response to Trigger inputs.}}
{{I|Trigger|Trigger the relay, causing its OnTrigger output to fire if it is enabled.}}
{{I|Toggle|Toggle the relay between enabled and disabled.}}
{{I|CancelPending|Cancel any events fired by this relay that are currently pending in the I/O event queue.}}
{{I|EnableRefire|Automatically fired on a relay after any delayed outputs finish firing, allowing it to fire again.|nofgd=1}}
{{I|TriggerWithParameter|param=string|only={{mapbase}}{{P2CE}}|Triggers the relay with a parameter, causing its OnTriggerParameter output to fire if it is enabled.}}
{{I Targetname}}
 
==Outputs==
{{O|OnSpawn|Fired when the relay is spawned. If the relay is set to only trigger once, it will delete itself after firing this output.}}
{{O|OnTrigger|Fired when the relay is triggered. If the relay is set to only trigger once, it will delete itself after firing this output.}}
{{O|OnTriggerParameter|param=string|only={{mapbase}}{{P2CE}}|Fired when the relay is triggered with a parameter. If the relay is set to only trigger once, it will delete itself after firing this output.}}
{{O Targetname}}
 
==See also==
* [[TeamSpen's Hammer Addons]]

Latest revision as of 10:05, 21 April 2025

English (en)Translate (Translate)

Comp numeric transition.png

comp_numeric_transition is an internal point entity available in Strata Source Strata Source and TeamSpen's Hammer Addons TeamSpen's Hammer Addons.

It changes a keyvalue or input over time with various options, when triggered.

KeyValues

Start Disabled ([todo internal name (i)]) <choices>
  • 0: No
  • 0: Yes
Entity to Control ([todo internal name (i)]) <targetname>
The entity to which the outputs will be directed to.
Keyvalue/Input Name ([todo internal name (i)]) <string>
The name of the keyvalue or input to change. If the target is not an entity findable by the postcompiler, IO Type must be set.
I/O Type ([todo internal name (i)]) <choices>
The method used to control an entity. If Input, use the input name provided. If KeyValue, use the AddOutput to change the keyvalue. If Auto, examine the entity class that is being controlled to determine the appropriate mode.
  • auto: Automatic
  • io: Input
  • kv: KeyValue (AddOutput)
Value Type ([todo internal name (i)]) <choices>
The behaviour of the input, used to control what actual values are sent. Regardless of this value, the other options are 'position'-type values!
  • set: Instantly Set
  • moveto: Move to value
  • speed: Adjust Speed
  • light: Light Pattern
Beat Interval ([todo internal name (i)]) <float>
Time between each output. Smaller values are more accurate but increase the outputs generated.
Start Delay ([todo internal name (i)]) <float>
Wait this amount of time after being triggered before animating.
Duration ([todo internal name (i)]) <float>
Time the change will take.
Start Value ([todo internal name (i)]) <float>
Starting value. If the Value Type is Light Pattern, these may be a-z letters.
Ending Value ([todo internal name (i)]) <float>
Ending value. If the Value Type is Light Pattern, these may be a-z letters.
Easing Start ([todo internal name (i)]) <choices>
Controls how the animation begins.
  • linear: None
  • quad: Quadratic (x^2)
  • cubic: Cubic (x^3)
  • quartic: Quartic (x^4)
  • sine: Sinusoidal
Easing End ([todo internal name (i)]) <choices>
Controls how the animation ends.
  • linear: None
  • quad: Quadratic (x^2)
  • cubic: Cubic (x^3)
  • quartic: Quartic (x^4)
  • sine: Sinusoidal
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

Only trigger once : [1]
Allow fast retrigger : [2]

Inputs

Enable
Allows the relay to fire the OnTrigger outputs after being disabled.
Disable
Prevents the relay from firing OnTrigger outputs in response to Trigger inputs.
Trigger
Trigger the relay, causing its OnTrigger output to fire if it is enabled.
Toggle
Toggle the relay between enabled and disabled.
CancelPending
Cancel any events fired by this relay that are currently pending in the I/O event queue.
EnableRefire  !FGD
Automatically fired on a relay after any delayed outputs finish firing, allowing it to fire again.
TriggerWithParameter <stringRedirectInput/string> (only in MapbasePortal 2: Community Edition)
Triggers the relay with a parameter, causing its OnTriggerParameter output to fire if it is enabled.


Outputs

OnSpawn
Fired when the relay is spawned. If the relay is set to only trigger once, it will delete itself after firing this output.
OnTrigger
Fired when the relay is triggered. If the relay is set to only trigger once, it will delete itself after firing this output.
OnTriggerParameter <stringRedirectOutput/string> (only in MapbasePortal 2: Community Edition)
Fired when the relay is triggered with a parameter. If the relay is set to only trigger once, it will delete itself after firing this output.


See also