Func movelinear: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
(Cleanup)
Line 1: Line 1:
{{wrongtitle|title=func_movelinear}}
{{base brush|func_movelinear}} It moves linearly along a given distance, in a given direction. Unlike a [[func_door]], it can be positioned anywhere along its axis of movement.  
{{base_brush}}
 
==Entity Description==
A [[brush entity]] that moves linearly along a given distance, in a given direction. Unlike a [[func_door]], it can be positioned anywhere along its axis of movement.  
{{brushmodel}}
{{brushmodel}}
{{warning | There are bugs with [[parenting]] this entity to another.}}
{{warning|There are bugs with [[parenting]] this entity to another.}}


* [http://twhl.co.za/mapvault_map.php?id=3920 Example map of a counter-weighted door].
* [http://twhl.info/vault.php?map=3920 Example map of a counter-weighted door].


==Keyvalues==
== Keyvalues ==
* {{KV Targetname}}
{{KV|Move Direction (Pitch Yaw Roll)|angle|The direction the brushes will move, when told to.}}
* {{KV Parentname}}
{{KV|Start Position|float|Position of brush when spawned. The range is a value between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).}}
* {{KV Origin}}
{{KV|Speed|integer|The speed that the brush moves, in inches per second.}}
* '''movedir'''
{{KV|Move Distance|float|The distance from the starting point that the brush should move, in inches.}}
: <angle> The direction the brushes will move, when told to.
{{KV|Block Damage|float|The amount of damage to do to any entity that blocks the brushes, per frame.}}
* '''startposition'''
{{KV|Sound played when the brush starts moving.|sound}}
: <float> Position of brush along the movement line when spawned (where you place it in the map). This does not change the spawned position of the brush. Rather, it defines how far either side of the spawned position the starting and end positions lie. The range is a value between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance). A value of 0.5 means that the starting and end positions are 1/2 the move distance from the spawned position.
{{KV|Sound played when the brush stops moving.|sound}}
* '''speed'''
{{KV Targetname}}
: <integer> The speed that the brush moves, in inches per second.
{{KV Parentname}}
* '''movedistance'''
{{KV Origin}}
: <float> The distance from the starting point that the brush should move, in inches.
{{KV RenderFields}}
* '''blockdamage'''
: <float> The amount of damage to do to any entity that blocks the brushes, per frame.
* '''startsound'''
: <sound> Sound played when the brush starts moving.
* '''stopsound'''
: <sound> Sound played when the brush stops moving.


==Flags==
== Flags ==
* 8 : Not Solid
* 8 : Not Solid


==Inputs==
== Inputs ==
* {{I Targetname}}
{{IO|Open|Move the brush to the end position (starting position + (move direction * move distance)).}}
* {{I Parentname}}
{{IO|Close|Move the brush to the starting position.}}
* '''Open'''
{{IO|SetPosition|Move the brush to a specific position between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).|param=string}}
: Move the brush to the end position (starting position + (move direction * move distance)).
{{IO|SetSpeed|Set the speed and update immediately.|param=float}}
* '''Close'''
{{I Targetname}}
: Move the brush to the starting position.
{{I Parentname}}
* '''SetPosition <float>'''
{{I RenderFields}}
: Move the brush to a specific position defined by a value. A value of 0 to 1 will move the brush to a position between the starting and end positions. A value greater than 1 moves the brush beyond the end position and a value less than 0 moves the brush beyond the starting position.
* '''{{EP2 add|SetSpeed <float>}}'''
: Set the brush's speed


==Outputs==
== Outputs ==
* {{O Targetname}}
{{IO|OnFullyOpen|Fired when the brush reaches the end position (starting position + (move direction * move distance)).}}
* '''OnFullyOpen'''
{{IO|OnFullyClosed|Fired when the brush reaches the starting position.}}
: Fired when the brush reaches the end position (starting position + (move direction * move distance)).
{{O Targetname}}
* '''OnFullyClosed'''
: Fired when the brush reaches the starting position.

Revision as of 08:08, 24 July 2011

Template:Base brush It moves linearly along a given distance, in a given direction. Unlike a func_door, it can be positioned anywhere along its axis of movement. Template:Brushmodel

Warning.pngWarning:There are bugs with parenting this entity to another.

Keyvalues

Move Direction (Pitch Yaw Roll) ([todo internal name (i)]) <angle>
The direction the brushes will move, when told to.
Start Position ([todo internal name (i)]) <float>
Position of brush when spawned. The range is a value between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).
Speed ([todo internal name (i)]) <integer>
The speed that the brush moves, in inches per second.
Move Distance ([todo internal name (i)]) <float>
The distance from the starting point that the brush should move, in inches.
Block Damage ([todo internal name (i)]) <float>
The amount of damage to do to any entity that blocks the brushes, per frame.
Sound played when the brush starts moving. ([todo internal name (i)]) <sound>
Sound played when the brush stops moving. ([todo internal name (i)]) <sound>
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

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.

Origin:

Origin (X Y Z) (origin) <origin>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.

RenderFields:


Render Mode (rendermode) <byte choices>
Set a non-standard rendering mode on this entity.
Render Modes
  • 0: Normal
  • 1: Color
  • 2: Texture
  • 3: Glow
  • 4: Solid/Alphatest Obsolete
  • 5: Additive
  • 6: Removed, does nothing Obsolete
  • 7: Additive Fractional Frame
  • 8: Alpha Add
  • 9: World Space Glow
  • 10: Don't Render
Render FX (renderfx) <byte choices>
Various somewhat legacy alpha effects. See render effects.
Render Amount / Transparency (renderamt) <byte>
Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color tint.

Flags

  • 8 : Not Solid

Inputs

Open
Move the brush to the end position (starting position + (move direction * move distance)).
Close
Move the brush to the starting position.
SetPosition <stringRedirectInput/string>
Move the brush to a specific position between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).
SetSpeed <floatRedirectInput/float>
Set the speed and update immediately.


Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

RenderFields:

Alpha <integer 0–255>
Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its rendermode set to a number other than 0.
Color <color255RedirectInput/color32>
Sets an RGB color for the entity.

Outputs

OnFullyOpen
Fired when the brush reaches the end position (starting position + (move direction * move distance)).
OnFullyClosed
Fired when the brush reaches the starting position.