Class FuncDoor
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
func_door. A brush that slides open along its movedir and back again, Source's CBaseDoor. It opens when used, told to, or walked into, and a walk into it can be passed on to the doors it chains to. Something in its way turns it around. Not simulated: the sounds, the master that has to be triggered first, the damage it deals whatever blocks it, and the door groups that open together.
public class FuncDoor : BaseToggleInheritance
object ← BaseEntity ← BaseModelEntity ← BaseToggle ← FuncDoor
Derived
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.SpawnData, BaseEntity.NameFixup, 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.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
FuncDoor(EntitySystem, EntitySpawnInfo)
Initializes a func_door from its keyvalues.
public FuncDoor(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
ForceClosed
Gets whether a blocked door holds its course rather than turning back, the forceclosed keyvalue. It still cannot move through what blocks it.
public bool ForceClosed { get; }Property Value
IsLocked
Gets whether the door refuses to open.
public bool IsLocked { get; }Property Value
IsOpen
Gets whether the door is open or on its way there.
public bool IsOpen { get; }Property Value
IsUnblockableByPlayer
Gets whether the player can never block this pusher, Source's FL_UNBLOCKABLE_BY_PLAYER. The player is moved the whole way, through the world if need be, and the pusher keeps going.
protected override bool IsUnblockableByPlayer { get; }Property Value
LastActivator
Gets the entity that last set the door going, Source's m_hActivator. The outputs report it, and arriving at either end forgets it.
protected BaseEntity? LastActivator { get; }Property Value
ObjectCaps
Gets whether the player can open this door by pressing it. Source's CBaseDoor::ObjectCaps: a door is only usable when the map said so.
public override EntityCapability ObjectCaps { get; }Property Value
PositionClosed
Gets the place the door rests when closed.
protected Vector3 PositionClosed { get; }Property Value
PositionOpen
Gets the place the door rests when open.
protected Vector3 PositionOpen { get; }Property Value
State
Gets where the door is in its travel.
protected BaseToggle.ToggleState State { get; set; }Property Value
Wait
Gets the seconds the door stays open before closing; a negative wait keeps it open.
public float Wait { get; }Property Value
Methods
InputClose(EntityInputData)
Closes the door, even one already closing, which sets it off again.
[EntityInput("Close")]
protected void InputClose(EntityInputData data)Parameters
data EntityInputData
InputLock(EntityInputData)
Stops the door opening until it is unlocked.
[EntityInput("Lock")]
protected void InputLock(EntityInputData data)Parameters
data EntityInputData
InputOpen(EntityInputData)
Opens the door, unless it is locked or already open. A locked door says nothing.
[EntityInput("Open")]
protected void InputOpen(EntityInputData data)Parameters
data EntityInputData
InputSetSpeed(EntityInputData)
Changes how fast the door travels from its next move on.
[EntityInput("SetSpeed")]
protected void InputSetSpeed(EntityInputData data)Parameters
data EntityInputData
InputSetToggleState(EntityInputData)
Puts the door at its open end for 0 and its closed end otherwise, without moving it there.
[EntityInput("SetToggleState")]
protected void InputSetToggleState(EntityInputData data)Parameters
data EntityInputData
InputToggle(EntityInputData)
Opens a closed door and closes an open one. A moving or locked door ignores it.
[EntityInput("Toggle")]
protected void InputToggle(EntityInputData data)Parameters
data EntityInputData
InputUnlock(EntityInputData)
Lets the door open again.
[EntityInput("Unlock")]
protected void InputUnlock(EntityInputData data)Parameters
data EntityInputData
JumpToEnd(bool)
Puts the door at one of its ends outright, without travelling or changing what it thinks it is doing. Source's SetToggleState.
protected virtual void JumpToEnd(bool atOpenEnd)Parameters
atOpenEnd bool
Whether to the open end rather than the closed one.
MoveDone()
Runs when comes due, after the tick's movement was applied.
public override void MoveDone()OnBlocked(BaseEntity)
Runs on every tick something blocks the door. Source's CBaseDoor::Blocked: unless it closes through or never comes back by itself, the door turns around, and so does every door sharing its name.
protected override void OnBlocked(BaseEntity blocker)Parameters
blocker BaseEntity
OnEndBlocked()
Runs on the first push that is no longer blocked. Source's EndBlocked.
protected override void OnEndBlocked()OnStartBlocked(BaseEntity)
Runs on the first tick a push is blocked by blocker. Source's StartBlocked.
protected override void OnStartBlocked(BaseEntity blocker)Parameters
blocker BaseEntity
What the push could not move.
OnTouch(BaseEntity)
Runs when the player walks into the door. Source's CBaseDoor::DoorTouch: the touch is passed on to the doors this one chains to, and opens this one when is set.
protected override void OnTouch(BaseEntity other)Parameters
other BaseEntity
SetUpSpawnPosition()
Puts the door where it spawns. A sliding door that spawns open is moved to its open end and counts as open, so closing it takes it back to where the map authored it.
protected virtual void SetUpSpawnPosition()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()StartMove(bool)
Sets the door travelling towards one of its two ends.
protected virtual void StartMove(bool opening)Parameters
opening bool
Use(BaseEntity?)
Runs when something presses the door. Source's CBaseDoor::Use: a door that is moving, or open and due to close by itself, ignores the press unless is set.
public override void Use(BaseEntity? activator)Parameters
activator BaseEntity?

