Class FuncMoveLinear
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
func_movelinear, Source's CFuncMoveLinear. A brush that travels an authored movedistance along its movedir, and only when told to: to either end, or any fraction of the way between them. Not simulated: the damage it does to whatever blocks it.
public class FuncMoveLinear : BaseToggleInheritance
object ← BaseEntity ← BaseModelEntity ← BaseToggle ← FuncMoveLinear
Inherited Members
BaseToggle.Speed, BaseToggle.Lip, BaseToggle.MoveDirection, BaseToggle.FinalDestination, BaseToggle.IsLinearMoving, BaseToggle.IsPusher, BaseToggle.TurnsByAngleComponents, BaseToggle.LinearMove(Vector3), BaseToggle.AngularMove(Vector3, float), BaseToggle.FinishLinearMove(), BaseToggle.GetAxisDirection(bool, bool), BaseToggle.ResolveEntitySpaceMoveDirection(), BaseToggle.GetTravelDistance(Vector3), BaseModelEntity.Solid, BaseModelEntity.ModelNode, BaseModelEntity.LoadedModel, BaseModelEntity.CreateRootNode(), BaseModelEntity.BuildsCollider, BaseModelEntity.InputColor(EntityInputData), BaseModelEntity.InputAlpha(EntityInputData), BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.LayerName, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.KeyValues, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.ParentTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, BaseEntity.IsCollidable, BaseEntity.TouchingEntities, BaseEntity.CreateRootNode(), BaseEntity.CreateEditorNode(ObjectTypeFlags), BaseEntity.CreateEffect(string?, ParticleSnapshot?, bool), BaseEntity.HasSpawnFlags<TSpawnFlags>(TSpawnFlags), BaseEntity.Spawn(), BaseEntity.Activate(), BaseEntity.Think(), BaseEntity.RoundStart(), BaseEntity.MoveDone(), BaseEntity.TryGetTouchBounds(out Vector3, out Vector3), BaseEntity.AcceptsTouchFrom(BaseEntity), BaseEntity.OnStartTouch(BaseEntity), BaseEntity.OnTouch(BaseEntity), BaseEntity.OnEndTouch(BaseEntity), BaseEntity.ObjectCaps, BaseEntity.Use(BaseEntity?), BaseEntity.Teleport(Vector3, Vector3?), BaseEntity.AcceptInput(string, EntityInputData), BaseEntity.InputKill(EntityInputData), BaseEntity.InputFireUser1(EntityInputData), BaseEntity.InputFireUser2(EntityInputData), BaseEntity.InputFireUser3(EntityInputData), BaseEntity.InputFireUser4(EntityInputData), BaseEntity.SetNextThink(float), BaseEntity.SetMoveDoneTime(float), BaseEntity.PhysicsSimulate(float), BaseEntity.TurnsByAngleComponents, BaseEntity.IsPusher, BaseEntity.PusherForcesThrough, BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.TurnBody(Vector3, Vector3), BaseEntity.SetOriginAndAngles(Vector3, Vector3), BaseEntity.AddNode(SceneNode, bool), BaseEntity.OnRemove(), BaseEntity.UpdateTransform(), BaseEntity.UpdateColliderTransform(), BaseEntity.UpdateRenderTransform(float), BaseEntity.SnapInterpolation(), BaseEntity.AngleMod(float)
Constructors
FuncMoveLinear(EntitySystem, EntitySpawnInfo)
Initializes a func_movelinear from its keyvalues.
public FuncMoveLinear(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
MoveDistance
Gets how far apart the two ends are.
public float MoveDistance { get; }Property Value
PositionClosed
Gets the closed end of the travel.
public Vector3 PositionClosed { get; }Property Value
PositionOpen
Gets the open end of the travel.
public Vector3 PositionOpen { get; }Property Value
Methods
InputClose(EntityInputData)
Travels to the closed end.
[EntityInput("Close")]
protected void InputClose(EntityInputData data)Parameters
data EntityInputData
InputOpen(EntityInputData)
Travels to the open end.
[EntityInput("Open")]
protected void InputOpen(EntityInputData data)Parameters
data EntityInputData
InputResetPosition(EntityInputData)
Makes the brush's current place the given fraction of the way along, moving both ends to suit. Like a teleport, a travel under way lands back here.
[EntityInput("ResetPosition")]
protected void InputResetPosition(EntityInputData data)Parameters
data EntityInputData
InputSetMoveDistanceFromEnd(EntityInputData)
Changes the travel, keeping the open end where it is.
[EntityInput("SetMoveDistanceFromEnd")]
protected void InputSetMoveDistanceFromEnd(EntityInputData data)Parameters
data EntityInputData
InputSetMoveDistanceFromStart(EntityInputData)
Changes the travel, keeping the closed end where it is.
[EntityInput("SetMoveDistanceFromStart")]
protected void InputSetMoveDistanceFromStart(EntityInputData data)Parameters
data EntityInputData
InputSetPosition(EntityInputData)
Travels to a fraction of the way from the closed end to the open end.
[EntityInput("SetPosition")]
protected void InputSetPosition(EntityInputData data)Parameters
data EntityInputData
InputSetSpeed(EntityInputData)
Changes the speed, carrying on to the same destination at the new one. A speed of zero stops the brush where it is.
[EntityInput("SetSpeed")]
protected void InputSetSpeed(EntityInputData data)Parameters
data EntityInputData
InputTeleportToTarget(EntityInputData)
Jumps to the named entity's origin, which becomes its closed end. A travel under way is not stopped: it carries on until its time is up and then lands back here.
[EntityInput("TeleportToTarget")]
protected void InputTeleportToTarget(EntityInputData data)Parameters
data EntityInputData
MoveDone()
Arrives, reporting it when that is at either end. The move sound stops a moment later rather than now, since another move may follow straight on.
public override void MoveDone()OnRemove()
Called as the entity leaves the world, before its nodes are taken out of the scene. Source's UpdateOnRemove: the place to let go of anything the entity started, such as a playing sound.
protected override void OnRemove()Spawn()
Sets up the entity: loads its model, reads class-specific keyvalues, and schedules its first think. Called by right after construction, before the entity enters the world.
public override void Spawn()Think()
Stops the start sound and plays the stop sound, once the brush has come to rest.
public override void Think()
