Logic parent: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:


== Keyvalues ==
== Keyvalues ==
{{KV BaseEntity|base=1}}
{{KV Targetname}}


==Flags==
==Flags==
{{def|num=1|Remove on fire}} Removes this entity when <code>OnFired</code> output is fired.
{{fl|1|Remove on fire|Removes this entity when <code>OnFired</code> output is fired.}}
{{def|num=2|Teleport child to parent}} Teleports child to parent [[origin]]. If unchecked, child will save initial position.
{{fl|2|Teleport child to parent|Teleports child to parent [[origin]]. If unchecked, child will save initial position.}}


== Inputs ==  
== Inputs ==  
{{IO|ParentEntities|param=string|Sets specified parent for specified object. Can't set [[attachment]] point. The syntax is: ''ParentName ChildName''.}}
{{I|ParentEntities|param=string|Sets specified parent for specified object. Can't set [[attachment]] point. The syntax is: ''ParentName ChildName''.}}
{{I BaseEntity|base=1}}


== Outputs ==
== Outputs ==
{{IO|OnFired|param=void|Fired when <code>ParentEntities</code> is successfully fired.}}
{{O|OnFired|param=void|Fired when <code>ParentEntities</code> is successfully fired.}}
{{O BaseEntity|}}

Revision as of 18:16, 25 September 2024

Logic auto.png

logic_parent is a point entity available in Black Mesa Black Mesa. This entity sets specified parent of specified entity via ParentEntities output. This entity also can teleport child to parent. Doesn't replace SetParent input, may be useful in some cases (for example when you need to know, if a child has a parent or not).

Black Mesa Level Creation

Keyvalues

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

Remove on fire : [1]
Removes this entity when OnFired output is fired.
Teleport child to parent : [2]
Teleports child to parent origin. If unchecked, child will save initial position.

Inputs

ParentEntities <stringRedirectInput/string>
Sets specified parent for specified object. Can't set attachment point. The syntax is: ParentName ChildName.

Outputs

OnFired <void>
Fired when ParentEntities is successfully fired.