prop_door_rotating
From Valve Developer Community
prop_door_rotating is a point entity available in all Source games. It creates an ordinary hinged door that can be opened by players and NPCs.
Contents |
Supported models
Only specific models will work properly with this entity. They are:
-
props_c17\door01_left.mdl -
props_c17\door02_double.mdl -
props_doors\door03_slotted_left.mdl -
To do: Any in L4D?
(Need info on how to create new door models.)
props_doors\door01_dynamic.mdl is not valid; it is meant for npc_furniture.See also
- func_door (sliding, brush-based)
- func_door_rotating
- Door creation
- WiseDoor - example use and illustration of doors.
KeyValues
- Slave name
<targetname> - Name of any door(s) that should open and close at the same time as this one. You could also give them all the same name.
- Hardware Type
<choices> - How the door is opened. The mechanism only appears in the game, not in Hammer.
- None
- Lever (i.e. door handle)
- Push bar
- Keypad
- Spawn Position
<choices> - State the door should begin in. Check the door's angles to see forward/backward orientation.
- Closed
- Open forward
- Open back
- Ajar
- Ajar Angles
<angle> - If "Spawn Position" is "ajar", these are the angles to spawn at instead of being open or closed.
- Hinge Axis
<axis> -
To do
- Rotation Distance
<float> - Number of degrees that the door should open, both forward and backward.
- Speed
<float> - In degrees/second.
- Fully Open Sound
<string> - Fully Closed Sound
<string> - Moving Sound
<string> - Locked Sound
<string> - Unlocked Sound
<string> - Optional overrides to the sounds played by the door.
- Delay Before close
<int> - Number of seconds the door waits until closing by itself. -1 means never auto-close.
- Damage Inflicted When Blocked
<int> - If an entity is blocking the door from moving, inflict this much damage per frame.
- Force Closed
<bool> - If set, this door will close no matter what. Useful for doors that have to close even if the player tries to block them with objects.
- Open Direction <choices>
- Force the door to open only forwards or only backwards. It will normally try to swing away from the entity that opened it, unless it is being blocked on the other side.
- Both directions
- Forward only
- Backward only
- Health
<int> - Deprecated.
Studiomodel:
- World Model
<string> - The model this entity should appear as. 128-character limit.
- Skin
<int> - Some models have multiple skins. This value selects from the index, starting with 0.
Tip:Hammer's model browser automatically updates this value if you use it to view different skins.
Shadow:
- Disable shadows
<bool> - Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
Global:
- Global Entity Name
<string> - Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with global names matching entities in the previous map will have the previous map's state copied over to them.
Angles:
- Pitch Yaw Roll (Y Z X)
<angle> - This entity's angular orientation in the world.
Parentname:
- Parent
<targetname> - Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
Flags
- Starts Open
- Starts locked
- Door silent (No sound, and does not alert NPCs)
- Use closes
- Door silent to NPCs (Does not alert NPCs)
- Ignore player +USE
Inputs
-
Open -
Close -
Toggle - Control door state
-
OpenAwayFrom <targetname> - Open the door away from the specified entity.
-
Lock -
Unlock - Lock/unlock the door.
-
SetRotationDistance <float> - Degrees of rotation that the door will open.
Studiomodel:
-
Skin <int> - Changes the model's skin to the specified number.
-
SetBodyGroup <int> - Set the model's body group.
-
EnableShadow -
DisableShadow - Control the model's cheap render-to-texture shadow.
-
AlternativeSorting <bool> - Used to attempt to fix sorting problems when rendering.
To do: What is the effect?
Parentname:
-
SetParent <targetname> - Move with this entity. See Entity Hierarchy (parenting).
-
SetParentAttachment <string> - Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
-
SetParentAttachmentMaintainOffset <string> - As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
-
ClearParent - Removes this entity from its current movement hierarchy.
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
Outputs
Door:
-
OnClose -
OnOpen - Fired when the door starts to to open or close.
-
OnFullyClosed -
OnFullyOpen - Fired when the door finishes opening or closing. Reversed if 'Start Open' flag is set.
-
OnBlockedClosing -
OnBlockedOpening - Fired when the door has been blocked from closing or opening. (activator is the blocking entity)
-
OnUnblockedClosing -
OnUnblockedOpening - Fired when the door is no longer blocked from closing or opening.
-
OnLockedUse - Fired when the player uses the door, but it is locked.
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
Studiomodel:
-
OnIgnite - Fired when the entity catches fire.
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
