Logic mirror movement: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Use new templates, and this is available in Mapbase and P2CE)
Line 1: Line 1:
'''logic_mirror_movement''' is a [[point entity]] available in SDK 2013 code.
'''logic_mirror_movement''' is a [[point entity]] available in SDK 2013 code. It mirrors an entity's movement to another entity.


{{bug|Valve forgot to add the server/logic_mirror_movement.cpp file to the [[VPC]]! Hence it is unavailable in every game, unless you add this .cpp file in your own mod's [[VPC]]. There is also no [[FGD]] definition available, one is written below instead.}}
{{bug|Valve forgot to add the <code>server/logic_mirror_movement.cpp</code> file to the [[VPC]]! Hence it is unavailable in every game, except for {{game link|Mapbase}} and {{game link|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.}}
===FGD Code===
 
==FGD Code==
<pre>@PointClass base(Targetname, Parentname) = logic_mirror_movement :
<pre>@PointClass base(Targetname, Parentname) = logic_mirror_movement :
"An entity that can mirror entity movement to another entity."
"An entity that can mirror entity movement to another entity."
[
[
m_target(target_destination)            : "Target entity"          :  : "Target entity."
m_target(target_destination)            : "Target Entity"          :  : "Target entity."
m_strMirrorTarget(target_destination)  : "Mirror Target entity"  :  : "Mirror target entity."
m_strMirrorTarget(target_destination)  : "Mirror Target Entity"  :  : "Mirror target entity."
m_strRemoteTarget(target_destination)  : "Remote Target entity"  :  : "Remote target entity."
m_strRemoteTarget(target_destination)  : "Remote Target Entity"  :  : "Remote target entity."
m_strMirrorRelative(target_destination) : "Mirror Relative entity" :  : "Mirror relative entity."
m_strMirrorRelative(target_destination) : "Mirror Relative Entity" :  : "Mirror relative entity."
input SetMirrorTarget(string) : "Set the Mirror Target entity."
        input SetTarget(string) : "Set the Target Entity."
input SetTarget(string) : "Set the Target entity."
input SetMirrorTarget(string) : "Set the Mirror Target Entity."
input SetRemoteTarget(string) : "Set the Remove Target entity."
input SetRemoteTarget(string) : "Set the Remote Target Entity."
input SetMirrorRelative(string) : "Set the Mirror Relative entity."
input SetMirrorRelative(string) : "Set the Mirror Relative Entity."
]</pre>
]</pre>
==Entity Description==
Mirror entity movement to another entity.


==Keyvalues==
==Keyvalues==
* {{KV Targetname}}
{{KV BaseEntity}}
* '''Target'''
 
: <target_destination> Target
{{KV|Target Entity|intn=m_target|target_destination|{{todo|Add proper description}}}}
* '''MirrorTarget'''
{{KV|Mirror Target Entity|intn=m_strMirrorTarget|target_destination|{{todo|Add proper description}}}}
: <target_destination> Mirror target entity
{{KV|Remote Target Entity|intn=m_strRemoteTarget|target_destination|{{todo|Add proper description}}}}
* '''RemoteTarget'''
{{KV|Mirror Relative Entity|intn=m_strMirrorRelative|target_destination|{{todo|Add proper description}}}}
: <target_destination> Remote target entity
 
* '''MirrorRelative'''
: <target_destination> Mirror relative entity
==Inputs==
==Inputs==
* {{I Targetname}}
{{I BaseEntity}}
* '''SetMirrorTarget <target_destination>'''
 
: Set MirrorTarget
{{IO|SetTarget|Set the Target Entity|param=string}}
* '''SetTarget <target_destination>'''
{{IO|SetMirrorTarget|Set the Mirror Target Entity|param=string}}
: Set Target
{{IO|SetRemoteTarget|Set the Remote Target Entity|param=string}}
* '''SetRemoteTarget <target_destination>'''
{{IO|SetMirrorRelative|Set the Mirror Relative Entity|param=string}}
: Set RemoteTarget
 
* '''SetMirrorRelative <target_destination>'''
: Set MirrorRelative
==Outputs==
==Outputs==
* {{O Targetname}}
{{O BaseEntity}}
 
[[Category:Source Base Entities]]
[[Category:Source Base Entities]]
[[Category:Point Entities]]
[[Category:Point Entities]]
[[Category:Entities]]
[[Category:Entities]]

Revision as of 20:31, 7 August 2020

logic_mirror_movement is a point entity available in SDK 2013 code. It mirrors an entity's movement to another entity.

Icon-Bug.pngBug:Valve forgot to add the server/logic_mirror_movement.cpp file to the VPC! Hence it is unavailable in every game, except for Mapbase Mapbase and Portal 2: Community Edition 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 ?]

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."
]

Keyvalues

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>
Set the Target Entity
SetMirrorTarget <stringRedirectInput/string>
Set the Mirror Target Entity
SetRemoteTarget <stringRedirectInput/string>
Set the Remote Target Entity
SetMirrorRelative <stringRedirectInput/string>
Set the Mirror Relative Entity

Outputs