CFuncMoveLinear

From Source Entities
(Redirected from Func movelinear)
Jump to navigation Jump to search

Code classes:

CFuncMoveLinear is a code class which is inherited by some moving brush entities.

Classnames:

  • func_movelinear - Can be told to move an arbitrary distance in a set direction.
  • momentary_door (Not in FGD) - GoldSrc name for func_movelinear. No reason to use it.
  • func_water_analog - This entity can create moving water, though this water will be cheap because expensive water requires it to always know what's surrounding it to render reflections and refractions. Only two materials are known to render correctly across all systems.[Noted 2005. Still accurate?] These are nature/water_movingplane and nature/water_dx70. Bug: L4d2-small.pngWater cannot be swum in.)

Note: The SetPosition input and Start Position keyvalue do not perform any bounds checking, so values less than 0 and greater than 1 can be used. Negative values will move in the opposite direction to the movement direction, and values greater than 1 will move it in multiples of the set Move Distance. Moving past the opened/closed position does not trigger the OnFullyOpen and OnFullyClosed outputs.

Bug: There are bugs that may arise when parenting this entity to any other CFuncMoveLinear. A func_door can be used as a workaround. See here for a code fix.

Flags[edit | edit source]

  • 8: Not Solid Bug: phys_constraint cannot constrain physics objects to this entity when this flag is enabled.

Keyvalues[edit | edit source]

Move Direction (Pitch Yaw Roll) (movedir) <angle>
The direction the brush will move in.
Move Distance (movedistance) <float>
The distance from the starting point that the brush should move, in units.
Speed (speed) <float>
How fast the brush moves.
Start Position (startposition) <float>
Position of brush when spawned, where 0 is the position shown in Hammer and 1 is the position given when Move Direction is combined with Move Distance.
Sound played when the brush starts moving (startsound) <sound>
Self-explanatory.
Sound played when the brush stops moving (stopsound) <sound>
Self-explanatory.
Block Damage (blockdamage) <float>
How much to damage entities that block the brush per tick.
Wave Height (WaveHeight) <float>
Does not work in Source. Used in Hl1.png to set how much water would jostle around with func_water_analog.
Shadows (Not in FGD) (vrad_brush_cast_shadows) <choices>
Determines if this entity will cast lightmap shadows.
  • 0: No shadows
  • 1: Cast shadows
Render Mode (rendermode) <choices>
A special rendering mode to use on this entity.
Render Amount/Transparency (renderamt) <integer>
Transparency amount, requires a Render Mode (rendermode) other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color channel filter to add to this entity's texture(s). Bug: P2.pngCsgo-small.pngBroken for brush entities.
Render FX (renderfx) <choices>
Preset appearance effects. Partially supported in Asw.png, completely non-functional in P2.pngCsgo-small.png. Bug: Sometimes functions incorrectly if changed with AddOutput, but is the only way to change effects other than making multiple versions of the object.
Minimum Light (_minlight) <float>
Minimum amount of light to hit this brush. 0 is none, 1 is "fullbright". Useful because the lightmaps will not update as the entity moves.
Render in Fast Reflections (drawinfastreflection) <boolean> (available in all games since P2.png)
Makes the entity be rendered in reflections from water materials using $reflectonlymarkedentities.

Inputs[edit | edit source]

Open
Moves the brush to the end position.
Close
Moves the brush to the start position.
SetPosition <float>
Moves the brush to a specific position, where 0 is the starting position and 1 is the end position.
SetSpeed <float>
Sets Speed.
TeleportToTarget <target_destination> (only available in L4d2-small.png)
Teleports the brush to the specified entity's origin. The "destination" position will also be changed so that the brush keeps the same movement angle and distance.
ResetPosition <float> (only available in L4d2-small.png)
Redefines the entity's current position as the one given in the parameter. For example, if the entity is currently at position 0.0 and the parameter is -1, it will move twice as far when told to move to position 1.0.
Alpha <integer>
Sets Render Amount/Transparency (renderamt).
Color <color255>
Sets the Render Color (rendercolor).
EnableDrawInFastReflection  (available in all games since P2.png)
Sets Render in Fast Reflections to true.
DisableDrawInFastReflection  (available in all games since P2.png)
Sets Render in Fast Reflections to false.

Outputs[edit | edit source]

OnFullyOpen
Fires when the brush stops at the end position.
OnFullyClosed
Fires when the brush stops at the start position.