Logic parent: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{This is a|point entity|name=logic_parent|game=Black Mesa|sprite=logic_auto.png}} This entity sets specified parent of specified entity via <code>ParentEntities</code> output...")
 
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{This is a|point entity|name=logic_parent|game=Black Mesa|sprite=logic_auto.png}} This entity sets specified parent of specified entity via <code>ParentEntities</code> output. This entity also can teleport child to parent. Doesn't replace <code>SetParent</code> input, may be useful in some cases (for example when you need to know, if a child has a parent or not).
{{CDA|CLogicParent|CLogicalEntity|CServerOnlyEntity|CBaseEntity|}}
{{back |Black Mesa Level Creation}}
{{This is a|logical entity|name=logic_parent|game=Black Mesa|sprite=logic_auto.png}} This entity sets specified parent for specified entity via <code>ParentEntities</code> output. This entity also can teleport child to parent. Useful in some cases, for example, when you need to know, if a child has a parent or not.
 
{{note|Doesn't replace <code>SetParent</code> input in this game.}}
== Keyvalues ==
{{KV BaseEntity}}


==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's [[origin]]. If unchecked, child will save initial position before the input.}}


== 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. The syntax is: ''ParentName ChildName''.
{{I BaseEntity}}
{{important|Can't set [[attachment]] point.}}
}}


== 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|}}

Latest revision as of 10:46, 8 July 2025

C++ Class hierarchy
CLogicParent
CLogicalEntity
CServerOnlyEntity
CBaseEntity
Logic auto.png

logic_parent is a logical entity available in Black Mesa Black Mesa. This entity sets specified parent for specified entity via ParentEntities output. This entity also can teleport child to parent. Useful in some cases, for example, when you need to know, if a child has a parent or not.

Note.pngNote:Doesn't replace SetParent input in this game.

Flags

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

Inputs

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

Outputs

OnFired <void>
Fired when ParentEntities is successfully fired.