Prop door rotating checkpoint: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{lang|prop_door_rotating_checkpoint}}
{{LanguageBar}}
{{CD2|CPropDoorRotatingCheckpoint}}
{{CD|CPropDoorRotatingCheckpoint}}
{{this is a|point entity|name=prop_door_rotating_checkpoint|series=Left 4 Dead}} It is a special variant of [[prop_door_rotating]] for checkpoint doors in the world.
{{This is a|model entity|name=prop_door_rotating_checkpoint|series=Left 4 Dead}} It is a special variant of {{ent|prop_door_rotating}} for checkpoint doors in the world.
{{Note|From {{l4d}} onwards (and in {{GMOD}}), rotating doors can be destroyed if the model used was compiled with {{ent|$collisiontext}}.}}
{{bug|Using raw door sounds will cause the sound to play everywhere in the map, despite the distance. This can be ignored in singleplayer games, but may be a problem in multiplayer games, because all players will hear the door throughout the whole map. This can be fixed by using a [[soundscript]].}}
{{bug|Specifying a Custom <code>Hinge Axis</code> in Hammer is broken. A workaround is to simply modify the model and set the origin to the hinge location.}}


== Supported Models ==
It's used by {{ent|info_changelevel}} to determine when to start the transition to the next map when all survivors stand inside. Usually only 1 door is used for ending checkpoint but it's possible to have multiple doors in which case all of them need to be closed. No doors is also possible but to achieve that the checkpoint must start with at least one door which is then killed afterwards via for example {{ent|logic_auto}}'s OnMapSpawn output. Having no doors this way might be useful in order to have saferoom activated by a button and utilizing Enable/Disable inputs of the info_changelevel entity or just have a saferoom that starts the transition immediately as all survivors touch it.
Most newer games such as {{L4D2}} have a model folder called <code>props_doors</code>, which feature various door models (including static props that will not work for prop_door_rotating). For a door model to be compatible, it must be a physics prop and its model origin must be on the hinge side of the door, as doors rotate around its origin.


[[File:Prop door rotating.png|300px|right|thumb|Example of a compatible door (Green) and an incompatible door (Red)<br> Note the origin of the red door being in the bottom middle. That is where the door would rotate along.]]
In Versus mode, the starting checkpoint door cannot be closed after it's been opened and it opens automatically if it remains closed for the amount of seconds specified in <code>versus_force_start_time</code> {{↓|Convars|cvar}}.
 
== Keyvalues ==
{{KV Targetname}}


{{Note|Notices and information how to set up doors on <code>prop_door_rotating</code> page also applies here}}
{{OtherKIO|prop_door_rotating|All}}
{{OtherKIO|prop_door_rotating|All}}
{{Note|The sound that plays for the metal bar being removed is hardcoded. It can only be changed by editing the level_sound script for each map. More info on how to do so can be found [[L4D Level Design/Checkpoints#"Last Stand" Saferoom Door|here]]}}


{{clr}}
== Gallery ==
 
Models used in official maps. 'Exit' and 'Dead End' signs should be usually facing inside of the saferoom. The models {{code|0x}} and {{code|-0x}} differ by having hinge on the opposite side. For each of these models there's also static version with {{code|_static}} at the end which are usable as {{ent|prop_static}}.
== Custom Door Models ==
<gallery mode=nolines widths=400px heights=350px>
 
checkpoint_door_01.jpg|<code>models/props_doors/checkpoint_door_01.mdl</code> and <code>models/props_doors/checkpoint_door_-01.mdl</code>
# Create <code>ACT_IDLE</code>, <code>ACT_DOOR_LOCKED</code> and <code>ACT_DOOR_OPEN</code> [[activities]].
checkpoint_door_02.jpg|<code>models/props_doors/checkpoint_door_02.mdl</code> and <code>models/props_doors/checkpoint_door_-02.mdl</code>
# Add a '''<code>door_options</code>''' {{ent|$keyvalues}} block:
</gallery>
 
<source>
$keyvalues
{
prop_data
{
blocklos 1
}
door_options
{
default // Fallbacks if something is missing elsewhere
{
open Doors.FullOpen1
close Doors.FullClose1
move Doors.Move1
locked DoorHandles.Locked1
unlocked DoorHandles.Unlocked1
}
hardware0 // First hardware type, by default a handle
{
locked DoorSound.Null
unlocked DoorSound.Null
}
hardware1 // Push bar
{
locked DoorHandles.Locked1
unlocked DoorHandles.Unlocked1
}
hardware2 // Keypad
{
locked DoorHandles.Locked2
unlocked DoorHandles.Unlocked2
}
 
skin0  // Skin-specific sounds, including a custom surfaceprop.
{
open Doors.FullOpen4
close Doors.FullClose4
move Doors.Move4
surfaceprop wood  // If no skin is specified, surfaceprop is always wood, no matter what's written elsewhere
}
}
}
</source>
 
==={{l4ds}} L4D Series Doors===
The Left 4 Dead series introduced a new set of doors that can be broken down by Infected.<br>
Those new doors make use of {{ent|$collisiontext}} and new "Pound" and "Damage" listings in <code>door_options</code>, highlighted below.<br>
Some doors in L4D2, which were ported from L4D, also have the following activities, although they do not seem to work: <code>ACT_DOOR_ANIMTOLOCK</code>, <code>ACT_DOOR_ANIMTOUNLOCK</code>, <code>ACT_DOOR_OPENFAIL</code>.
{{note|Animations with the activity <code>ACT_DOOR_LOCKED</code> do not seem to work. Only workaround seems to be manually adding I/O connections to the door in hammer, or play a specific sequence when used while locked.}}
<syntaxhighlight lang=text highlight=1-9,18,31-35>
$collisiontext
{
break
{
"model" "Props_downtown\door_interior_128_01_dm01_02" //Spawns a debris model.
"health" "100"
"fadetime" "10"
}
}
 
$keyvalues
{
prop_data
{
"base" "Door.Standard"
"allowstatic" "1"
"blocklos" "1"
"dmg.bullets" "0"  //Bullets will no longer damage this door. In L4D2 this is only used on the last damage model.
 
}
door_options
{
"defaults"
{
"open" "Doors.FullOpen1"
"close" "Doors.FullClose1"
"move" "Doors.Move1"
"locked" "DoorHandles.Locked1"
"unlocked" "DoorHandles.Unlocked1"


"pound" "Doors.Wood.Pound1" //Sound that plays when infected attack the door to break it down.
== Convars ==
"surfaceprop" "wood" //Overwrites Surfaceprop.
{{varcom|start}}
"damage1" "props_downtown\door_interior_128_01_DM01_01" //What the first damage model is.
{{varcom|z_checkpoint_debug|0|boolean|Shows detected checkpoints and checkpoint doors and areas associated with them.}}
"damage2" "props_downtown\door_interior_128_01_DM02_01" //What the second damage model is.
{{varcom|versus_force_start_time|90|seconds|Starts versus game after this amount of time, even if survivors are still inside the safe room}}
"damage3" "props_downtown\door_interior_128_01_DM03_01" //What the third damage model is.
{{varcom|end}}
}
}
}
</syntaxhighlight>
The "Damage1", "Damage2" and "Damage3" lines determine what models will be used for the broken stages of this door model.<br>
{{note|The sound that plays for the metal bar being removed is hardcoded. It can only be changed by editing the level_sound script for each map. More info on how to do so can be found [[L4D_Level_Design/Checkpoints#.22Last_Stand.22_Saferoom_Door.|here]]}}
{{warning|All damage models need their own set of door options. Not having door options for the damaged models will cause those doors to be silent if you decide to immediately use a damaged door.}}


== See also ==
== See also ==
* {{ent|func_door}} (sliding, [[brush]]-based)
* {{ent|prop_door_rotating}}
* {{ent|func_door_rotating}} (brush-based)
* [[Door creation]]
* [[Door creation]]
* [[WiseDoor]] - example use and illustration of doors.
* [[WiseDoor]] - example use and illustration of doors.


[[Category:QC Keyvalues]]
[[Category:QC Keyvalues]]
[[Category:Prop entities]]
[[Category:Prop entities|door rotating checkpoint]]

Latest revision as of 02:01, 11 June 2025

English (en)Translate (Translate)
C++ Class hierarchy
CPropDoorRotatingCheckpoint
CPropDoorRotating
CBasePropDoor
CDynamicProp
CBreakableProp
CBaseProp
CBaseAnimating
CBaseEntity

prop_door_rotating_checkpoint is a model entity available in Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series. It is a special variant of prop_door_rotating for checkpoint doors in the world.

It's used by info_changelevel to determine when to start the transition to the next map when all survivors stand inside. Usually only 1 door is used for ending checkpoint but it's possible to have multiple doors in which case all of them need to be closed. No doors is also possible but to achieve that the checkpoint must start with at least one door which is then killed afterwards via for example logic_auto's OnMapSpawn output. Having no doors this way might be useful in order to have saferoom activated by a button and utilizing Enable/Disable inputs of the info_changelevel entity or just have a saferoom that starts the transition immediately as all survivors touch it.

In Versus mode, the starting checkpoint door cannot be closed after it's been opened and it opens automatically if it remains closed for the amount of seconds specified in versus_force_start_time cvar ↓.

Note.pngNote:Notices and information how to set up doors on prop_door_rotating page also applies here
Note.pngNote:All Keyvalues / Inputs / Outputs are same as prop_door_rotating.
Note.pngNote:The sound that plays for the metal bar being removed is hardcoded. It can only be changed by editing the level_sound script for each map. More info on how to do so can be found here

Gallery

Models used in official maps. 'Exit' and 'Dead End' signs should be usually facing inside of the saferoom. The models 0x and -0x differ by having hinge on the opposite side. For each of these models there's also static version with _static at the end which are usable as prop_static.

Convars

Cvar/Command Parameters or default value Descriptor Effect
z_checkpoint_debug 0 boolean Shows detected checkpoints and checkpoint doors and areas associated with them.
versus_force_start_time 90 seconds Starts versus game after this amount of time, even if survivors are still inside the safe room

See also