Logic mirror movement: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(TODO)
m (none of these are in the fgd by default)
 
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{todo|Is this a base engine point entity? if so, add [[Template:Base point]].}}
{{CD|CLogicMirrorMovement|file1=[https://github.com/mapbase-source/source-sdk-2013/blob/471a840ed98c7206237cb579671a6d6fda9fd4f9/mp/src/game/server/logic_mirror_movement.cpp#L51 logic_mirror_movement.cpp]|nolink=1}}
==Entity Description==
{{this is a|point entity|name=logic_mirror_movement|game=Mapbase|game1=Strata Source}} It is also available on the code of the Source 2013 SDK, however it does not function by default. It mirrors an entity's movement to another entity.
Mirror entity movement to another entity
 
==Keyvalues==
{{bug|While this entity is available in the {{src13|3.1}} code, Valve forgot to add the {{file|server/logic_mirror_movement.cpp}} file to the [[VPC]]! Hence it is unavailable in every game, except for {{mapbase|3.1}} and {{p2ce|3.1}}. To enable it in your own mod, add this .cpp file in your mod's [[VPC]]. You will also need to add an [[FGD]] definition, such as the one provided below.}}
* {{KV Targetname}}
 
* '''Target'''
== Keyvalues ==
: <target_destination> Target
{{KV Targetname}}
* '''MirrorTarget'''
{{KV|Target Entity|intn=m_target|target_destination|{{todo|Add proper description}}}}
: <target_destination> Mirror target entity
{{KV|Mirror Target Entity|intn=m_strMirrorTarget|target_destination|{{todo|Add proper description}}}}
* '''RemoteTarget'''
{{KV|Remote Target Entity|intn=m_strRemoteTarget|target_destination|{{todo|Add proper description}}}}
: <target_destination> Remote target entity
{{KV|Mirror Relative Entity|intn=m_strMirrorRelative|target_destination|{{todo|Add proper description}}}}
* '''MirrorRelative'''
 
: <target_destination> Mirror relative entity
== Inputs ==
==Inputs==
{{I|SetTarget|Set the Target Entity|param=string|nofgd=1}}
* {{I Targetname}}
{{I|SetMirrorTarget|Set the Mirror Target Entity|param=string|nofgd=1}}
* '''SetMirrorTarget <target_destination>'''
{{I|SetRemoteTarget|Set the Remote Target Entity|param=string|nofgd=1}}
: Set MirrorTarget
{{I|SetMirrorRelative|Set the Mirror Relative Entity|param=string|nofgd=1}}
* '''SetTarget <target_destination>'''
 
: Set Target
== FGD Code ==
* '''SetRemoteTarget <target_destination>'''
<pre>@PointClass base(Targetname, Parentname) = logic_mirror_movement :
: Set RemoteTarget
"An entity that can mirror entity movement to another entity."
* '''SetMirrorRelative <target_destination>'''
[
: Set MirrorRelative
m_target(target_destination)            : "Target Entity"          :  : "Target entity."
==Outputs==
m_strMirrorTarget(target_destination)  : "Mirror Target Entity"  :  : "Mirror target entity."
* {{O Targetname}}
m_strRemoteTarget(target_destination)  : "Remote Target Entity"  :  : "Remote target entity."
[[Category:Half-Life 2: Episode One Entities]]
m_strMirrorRelative(target_destination) : "Mirror Relative Entity" :  : "Mirror relative entity."
        input SetTarget(string) : "Set the Target Entity."
input SetMirrorTarget(string) : "Set the Mirror Target Entity."
input SetRemoteTarget(string) : "Set the Remote Target Entity."
input SetMirrorRelative(string) : "Set the Mirror Relative Entity."
]</pre>
 
[[Category:Source Base Entities]]
[[Category:Point Entities]]
[[Category:Entities]]

Latest revision as of 01:29, 15 December 2024

C++ Class hierarchy
CLogicMirrorMovement
CLogicalEntity
CServerOnlyEntity
CBaseEntity
C++ logic_mirror_movement.cpp

logic_mirror_movement is a point entity available in Mapbase Mapbase and Strata Source Strata Source. It is also available on the code of the Source 2013 SDK, however it does not function by default. It mirrors an entity's movement to another entity.

Icon-Bug.pngBug:While this entity is available in the Source 2013 code, Valve forgot to add the 🖿server/logic_mirror_movement.cpp file to the VPC! Hence it is unavailable in every game, except for Mapbase and Portal 2: Community Edition. To enable it in your own mod, add this .cpp file in your mod's VPC. You will also need to add an FGD definition, such as the one provided below.  [todo tested in ?]

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

Target Entity (m_target) <targetname>
Todo: Add proper description
Mirror Target Entity (m_strMirrorTarget) <targetname>
Todo: Add proper description
Remote Target Entity (m_strRemoteTarget) <targetname>
Todo: Add proper description
Mirror Relative Entity (m_strMirrorRelative) <targetname>
Todo: Add proper description

Inputs

SetTarget <stringRedirectInput/string> !FGD
Set the Target Entity
SetMirrorTarget <stringRedirectInput/string> !FGD
Set the Mirror Target Entity
SetRemoteTarget <stringRedirectInput/string> !FGD
Set the Remote Target Entity
SetMirrorRelative <stringRedirectInput/string> !FGD
Set the Mirror Relative Entity

FGD Code

@PointClass base(Targetname, Parentname) = logic_mirror_movement :
	"An entity that can mirror entity movement to another entity."
[
	m_target(target_destination)            : "Target Entity"          :  : "Target entity."
	m_strMirrorTarget(target_destination)   : "Mirror Target Entity"   :  : "Mirror target entity."
	m_strRemoteTarget(target_destination)   : "Remote Target Entity"   :  : "Remote target entity."
	m_strMirrorRelative(target_destination) : "Mirror Relative Entity" :  : "Mirror relative entity."
	
        input SetTarget(string) : "Set the Target Entity."
	input SetMirrorTarget(string) : "Set the Mirror Target Entity."
	input SetRemoteTarget(string) : "Set the Remote Target Entity."
	input SetMirrorRelative(string) : "Set the Mirror Relative Entity."
]