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

Comp relay: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (woops)
m (Substituted IO templates)
 
(15 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Language subpage}}
{{LanguageBar}}
{{this is a|e1|name=comp_relay|sprite=1|game=Portal 2: Community Edition}} It is also available in all games with {{teamspen|4}} installed. It is an optimized version of [[logic_relay]]. The entities numerous inputs and outputs can be used to bundle inputs/outputs together. Inputs only work if given directly from entities placed in Hammer. Some features from logic_relay are missing, most are missing because this entity does not have any of its flags.
{{this is a|point entity|internal=1|sprite=1|name=comp_relay|game=Strata Source|game1=TeamSpen's Hammer Addons}}  


It is an optimized version of [[logic_relay]]. The entities numerous inputs and outputs can be used to bundle inputs/outputs together. Some features from <code>logic_relay</code> are missing, most are missing because this entity does not have any of its flags.
{{Note| Inputs and outputs only work if given directly from entities placed in Hammer, messages sent in game and dynamically will not work.}}






== Keyvalues ==
== Keyvalues ==
{{KV|Name|intn=targetname|string|The name that other entities refer to this entity by. This entity only exists during compilation, so the name is only usable in limited situations.}}
{{KV StaticTargetName}}
{{KV|Control Type|intn=ctrl_type|choices|Controls how the Control Value is interpreted.}}
{{KV ControlEnables}}
:* 0 : Is Enabled?
:* 1 : Is Disabled?
{{KV|Control Value|intn=ctrl_value|choices|Decides whether this entity is enabled. If disabled, the entity has no effect.}}
:* 0 : No
:* 1 : Yes
{{KV|Extra Delay|intn=delay|float|Add this delay to all outputs. This allows you to control this via $fixup values, for instance.}}
{{KV|Extra Delay|intn=delay|float|Add this delay to all outputs. This allows you to control this via $fixup values, for instance.}}


== Inputs ==
== Inputs ==
{{IO|Trigger|param=string|Trigger the relay and fire the output.}}
{{I|Trigger|param=string|Trigger the relay and fire the output.}}
{{IO|TurnOn|param=string|Fire the OnTurnedOn output.}}
{{I|TurnOn|param=string|Fire the OnTurnedOn output.}}
{{IO|TurnOff|param=string|Fire the OnTurnedOff output.}}
{{I|TurnOff|param=string|Fire the OnTurnedOff output.}}
{{IO|FireUser1|to=FireUser8|param=string|Fires the respective<code>OnUser</code>outputs; see [[User Inputs and Outputs]].}}
{{I|FireUser1|to=FireUser8|param=string|Fires the respective<code>OnUser</code>outputs; see [[User Inputs and Outputs]].}}


== Outputs ==
== Outputs ==
{{IO|OnTrigger|param=string|Fired when the relay is triggered.}}
{{O|OnTrigger|param=string|Fired when the relay is triggered.}}
{{IO|OnTurnOn|param=string|Fired when the relay is turned on.}}
{{O|OnTurnOn|param=string|Fired when the relay is turned on.}}
{{IO|OnTurnOff|param=string|Fired when the relay is turned off.}}
{{O|OnTurnOff|param=string|Fired when the relay is turned off.}}
{{IO|OnUser1|to=OnUser8|param=string|These outputs each fire in response to the firing of the like-numbered <code>FireUser1</code> to <code>FireUser8</code> Input; see [[User Inputs and Outputs]].}}
{{O|OnUser1|to=OnUser8|param=string|These outputs each fire in response to the firing of the like-numbered <code>FireUser1</code> to <code>FireUser8</code> Input; see [[User Inputs and Outputs]].}}
==See also ==
==See also ==
* [[logic_relay]]
* [[logic_relay]]
* [[TeamSpen's Hammer Addons]]
* [[TeamSpen's Hammer Addons]]
{{P2CE topicon}}

Latest revision as of 10:06, 21 April 2025

English (en)Translate (Translate)
Comp relay.png

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

It is an optimized version of logic_relay. The entities numerous inputs and outputs can be used to bundle inputs/outputs together. Some features from logic_relay are missing, most are missing because this entity does not have any of its flags.

Note.pngNote: Inputs and outputs only work if given directly from entities placed in Hammer, messages sent in game and dynamically will not work.


Keyvalues

StaticTargetName:
Name (targetname) <string>
The name that other entities refer to this entity by. This entity only exists during compilation, so the name is only usable in limited situations.
ControlEnables:
Control Type (ctrl_type) <choices>
Controls how the Control Value is interpreted.
  • 0 : Is Enabled?
  • 1 : Is Disabled?
Control Value (ctrl_value) <choices>
Decides whether this entity is enabled. If disabled, the entity has no effect.
  • 0 : No
  • 1 : Yes
Extra Delay (delay) <float>
Add this delay to all outputs. This allows you to control this via $fixup values, for instance.

Inputs

Trigger <stringRedirectInput/string>
Trigger the relay and fire the output.
TurnOn <stringRedirectInput/string>
Fire the OnTurnedOn output.
TurnOff <stringRedirectInput/string>
Fire the OnTurnedOff output.
FireUser1 to FireUser8 <stringRedirectInput/string>
Fires the respectiveOnUseroutputs; see User Inputs and Outputs.

Outputs

OnTrigger <stringRedirectOutput/string>
Fired when the relay is triggered.
OnTurnOn <stringRedirectOutput/string>
Fired when the relay is turned on.
OnTurnOff <stringRedirectOutput/string>
Fired when the relay is turned off.
OnUser1 to OnUser8 <stringRedirectOutput/string>
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser8 Input; see User Inputs and Outputs.

See also