Func movelinear: Difference between revisions
Jump to navigation
Jump to search
Note:The
Bug:There are bugs that may arise when parenting this entity to any of these: func_movelinear, func_lookdoor, func_water_analog. A func_door (or for func_water_analog, func_water) can be used as a workaround. (see here for a code fix)[
Code Fix]
Confirm:Might be fixed in Portal 2? Parented movelinears are used extensively for this game's piston platforms.
Bug:Physics objects cannot be constrained to this entity when this flag is enabled. [todo tested in ?]
Bug:Block damage doesn't function on players who passed through a trigger_teleport using noclip, though it will have effect again if the the player goes through a trigger_teleport without noclip. [todo tested in ?]
Note:Archived page history
Important:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.
NvC DmN CH (talk | contribs) m (todo on the parenting bug) |
(updates) |
||
Line 1: | Line 1: | ||
{{ | {{lang|Func movelinear}} | ||
| | {{base brush|func_movelinear}} It moves linearly along a given distance, in a given direction. Unlike a {{ent|func_door}}, it can be positioned anywhere along its axis of movement, making moving things much simpler in most cases while also using less memory. | ||
}} | |||
{{ | {{FuncMoveLinear notes}} | ||
{{code class|CFuncMoveLinear|func_movelinear.cpp}} | |||
==Flags== | |||
{{Fl FuncMoveLinear}} | |||
{{ | |||
== Keyvalues == | ==Keyvalues== | ||
{{KV | {{KV FuncMoveLinear}} | ||
{{KV | {{KV visiblebrush}} | ||
{{KV | {{KV BaseEntity}} | ||
== | ==Inputs== | ||
{{I FuncMoveLinear}} | |||
{{I visiblebrush}} | |||
{{I BaseEntity|prel4d=1}} | |||
==Outputs== | |||
{{O FuncMoveLinear}} | |||
== | {{O BaseEntity|l4d=1}} | ||
{{ | |||
{{ | |||
==See also== | ==See also== | ||
* [http://twhl.info/vault.php?map=3920 Example map of a counter-weighted door]. | *[http://twhl.info/vault.php?map=3920 Example map of a counter-weighted door]. |
Revision as of 05:20, 9 September 2018
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, making moving things much simpler in most cases while also using less memory.

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.


Flags
FuncMoveLinear:
- Not Solid : [8]

Keyvalues
FuncMoveLinear:
- Move Direction (Pitch Yaw Roll) (movedir) <angle>
- The direction the entity will move in.
- Start Position (startposition) <float>
- Position of brush when spawned, where 0 is the starting position and 1 is starting position + (move direction * move distance).
- Speed (speed) <integer>
- The speed that the brush moves, in inches per second.
- Move Distance (movedistance) <float>
- The distance from the starting point that the brush should move, in inches.
- Block Damage (blockdamage) <float>
- The amount of damage to do to any entity that blocks the brushes, per frame.

- Sound played when the brush starts moving. (startsound) <sound>
- The sound to play when the brush starts moving.
- Sound played when the brush stops moving. (stopsound) <sound>
- The sound to play when the brush stops moving.

This template (and its redirect) is
Deprecated. Its use is not recommended and its functionality may be compromised.
Please use {{Brush rendering note}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Please use {{Brush rendering note}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.


Inputs
FuncMoveLinear:
- Open
- Move the brush to the end position (starting position + (move direction * move distance)).
- Close
- Move the brush to the starting position.
- SetPosition <float >
- Move the brush to a specific position, where 0 is the starting position and 1 is the starting position + (move direction * move distance).
- SetSpeed <float >
- Set the speed and update immediately.
- TeleportToTarget <targetname > (only in
)
- Teleport to the origin of a given entity.
- ResetPosition <float > (only in
)
- Set a new start position, parameter relative to wherever the current one is. Todo: Parameter might actually be optional?
- SetDamageFilter <targetname >
- Sets a filter for this entity for when it receives damage.
- EnableDamageForces
- Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).
- DisableDamageForces
- Prevents the entity from being pushed by damage done to it.
Todo: move/mention at proper place
Outputs
FuncMoveLinear:
- OnFullyOpen
- !activator = !caller = this entity
Fired when the brush reaches the end position (starting position + (move direction * move distance)).
- OnFullyClosed
- !activator = !caller = this entity
Fired when the brush reaches the starting position.