Class FuncMoveLinear
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
func_movelinear. A brush that moves movedistance along movedir on command, to either end or any fraction between. Damage to whatever blocks it is not simulated.
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.Physics, BaseModelEntity.LoadedModel, BaseModelEntity.CreateRootNode(), BaseModelEntity.BuildsCollider, BaseModelEntity.InputColor(EntityInputData), BaseModelEntity.InputAlpha(EntityInputData), BaseModelEntity.InputLightingOrigin(EntityInputData), BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.SpawnData, BaseEntity.NameFixup, BaseEntity.SpawnGroup, BaseEntity.KeyValues, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.SpawnTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.WorldOrigin, BaseEntity.WorldAngles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, BaseEntity.IsShown, 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.JumpTo(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.IsUnblockableByPlayer, BaseEntity.MovesWithoutPushing, BaseEntity.PushesPlayerAsTrain, BaseEntity.HasVPhysicsSolid, BaseEntity.OnStartBlocked(BaseEntity), BaseEntity.OnBlocked(BaseEntity), BaseEntity.OnEndBlocked(), BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.TurnBody(Vector3, Vector3), BaseEntity.SetOriginAndAngles(Vector3, Vector3), BaseEntity.SetWorldOriginAndAngles(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
float
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 current position the given fraction along the travel, moving both ends. 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, keeping the destination. 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 the closed end. A travel under way is not stopped: it lands back here when its time is up.
[EntityInput("TeleportToTarget")]
protected void InputTeleportToTarget(EntityInputData data)Parameters
data EntityInputData
MoveDone()
Fires OnFullyOpen or OnFullyClosed when arriving at an end. The move sound stops 0.1s later, since another move may follow straight on.
public override void MoveDone()OnRemove()
Called as the entity leaves the world, before its nodes leave the scene. Release anything the entity started here, such as a playing sound.
protected override void OnRemove()Spawn()
Sets up the entity (model, class keyvalues, first think). Called once its spawn group has created all of its entities, after its move parent has spawned.
public override void Spawn()Remarks
An override calls this first: it builds the node from BaseEntity.CreateRootNode() and snaps the entity onto its parent's attachment, which the rest of the override reads.
Think()
Stops the start sound and plays the stop sound, once the brush has come to rest.
public override void Think()
