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

comp_relay

From Valve Developer Community
Revision as of 12:48, 4 September 2024 by SirYodaJedi (talk | contribs)
Jump to navigation Jump to search
English (en)Translate (Translate)
comp_relay
Comp relay.png
TypeInternal Point entity
EngineSource Source
AvailabilityTeamSpen's Hammer Addons TeamSpen's Hammer Addons
 

comp_relay is an internal point entity available in Portal 2: Community Edition Portal 2: Community Edition and TeamSpen's Hammer Addons TeamSpen's Hammer Addons.

It is also available in all games with TeamSpen's Hammer Addons TeamSpen's Hammer Addons installed. 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 <stringRedirectInput/string>
Fired when the relay is triggered.
OnTurnOn <stringRedirectInput/string>
Fired when the relay is turned on.
OnTurnOff <stringRedirectInput/string>
Fired when the relay is turned off.
OnUser1 to OnUser8 <stringRedirectInput/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