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

Comp kv setter: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎KeyValues: can also be used as prop_static lighting origin, if you so choose.)
No edit summary
Line 8: Line 8:
|in={{teamspen|4}}
|in={{teamspen|4}}
}}
}}
{{this is a|point entity|internal=1|name=comp_kv_setter|game=Portal 2: Community Edition}}  
{{this is a|point entity|internal=1|name=comp_kv_setter|game=Portal 2: Community Edition|game1=TeamSpen's Hammer Addons}}  


It is also available in all games with {{Teamspen|3.1}} installed. It sets a keyvalue on an entity to a new value. This can be used in cases to compute spawnflags, or to adjust keyvalues when the target entity's options cannot be set to a fixup variable.
It sets a keyvalue on an entity to a new value. This can be used in cases to compute spawnflags, or to adjust keyvalues when the target entity's options cannot be set to a fixup variable.


==KeyValues==
==KeyValues==

Revision as of 12:43, 4 September 2024

English (en)Translate (Translate)

comp_kv_setter
Comp kv setter.png
TypeInternal Point entity
EngineSource Source
AvailabilityTeamSpen's Hammer Addons TeamSpen's Hammer Addons
 

comp_kv_setter 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 sets a keyvalue on an entity to a new value. This can be used in cases to compute spawnflags, or to adjust keyvalues when the target entity's options cannot be set to a fixup variable.

KeyValues

Name (targetname) <string>
Name of this entity. Can be used by compile tools as a prop_static's lighting origin.
Also displayed in Hammer's 2D views and Entity Report. No effect in-game.
Pitch Yaw Roll (Y Z X) ([todo internal name (i)]) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Target Entity ([todo internal name (i)]) <targetname>
The name of the entity or entities to set values on.
Mode ([todo internal name (i)]) <choices>
The type of value to set
  • kv: KeyValues
  • flags: SpawnFlags
Name / Mask ([todo internal name (i)]) <string>
The name of the keyvalue to set, or the bits to change for spawnflags.
Value - String ([todo internal name (i)]) <string>
The value to apply.
Value - Ent Name ([todo internal name (i)]) <targetname>
If set, use this fixed-up entity name.
Invert Value ([todo internal name (i)]) <choices>
If enabled, invert the value so 0 and 1 are swapped.
  • 0: No
  • 1: Yes
Rotate Value ([todo internal name (i)]) <choices>
If enabled, treat the value as a vector and rotate it by the angles set on this entity first.
  • 0: No
  • 1: Yes
Convert To Angle ([todo internal name (i)]) <choices>
If enabled, convert a +X axis normal back into the Euler angle.
  • 0: No
  • 1: Yes

Outputs

Any output may be used. All outputs defined on a comp_kv_setter are copied to the target entity.

See also