prop_door_rotating_checkpoint

From Valve Developer Community
Jump to: navigation, search
English (en)
class hierarchy
CPropDoorRotatingCheckpoint
CPropDoorRotating
CBasePropDoor
CDynamicProp
CBreakableProp
CBaseProp
CBaseAnimating
CBaseEntity

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

Note.pngNote:From Left 4 Dead onwards (and in Garry's Mod), rotating doors can be destroyed if the model used was compiled with $collisiontext.
Icon-Bug.pngBug: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.
Icon-Bug.pngBug:Specifying a Custom Hinge Axis in Hammer is broken. A workaround is to simply modify the model and set the origin to the hinge location.

Supported Models

Most newer games such as Left 4 Dead 2 have a model folder called props_doors, 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.

Example of a compatible door (Green) and an incompatible door (Red)
Note the origin of the red door being in the bottom middle. That is where the door would rotate along.

Keyvalues

Name (targetname) <string>
The targetname that other entities refer to this entity by.
Note.pngNote:All Keyvalues / Inputs / Outputs are same as prop_door_rotating

Custom Door Models

  1. Create ACT_IDLE, ACT_DOOR_LOCKED and ACT_DOOR_OPEN activities.
  2. Add a door_options $keyvalues block:
$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
		}
	}
}

Left 4 Dead series L4D Series Doors

The Left 4 Dead series introduced a new set of doors that can be broken down by Infected.
Those new doors make use of $collisiontext and new "Pound" and "Damage" listings in door_options, highlighted below.
Some doors in L4D2, which were ported from L4D, also have the following activities, although they do not seem to work: ACT_DOOR_ANIMTOLOCK, ACT_DOOR_ANIMTOUNLOCK, ACT_DOOR_OPENFAIL.

Note.pngNote:Animations with the activity ACT_DOOR_LOCKED 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.
$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.
			"surfaceprop"	"wood"											//Overwrites Surfaceprop.
			"damage1"		"props_downtown\door_interior_128_01_DM01_01"	//What the first damage model is.
			"damage2"		"props_downtown\door_interior_128_01_DM02_01" 	//What the second damage model is.
			"damage3"		"props_downtown\door_interior_128_01_DM03_01" 	//What the third damage model is.
		}
	}
}

The "Damage1", "Damage2" and "Damage3" lines determine what models will be used for the broken stages of this door model.

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
Warning.pngWarning: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