Template:KV Door: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (standard-table)
m (Setting bug notice hidetested=1 param on page where the bug might not need tested in param specified)
 
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{KV Targetname}}
<noinclude>{{lang|Template:KV Door}}[[Category:Keyvalue Templates|Door]]</noinclude>
* {{KV Parentname}}
{{minititle|BaseDoor}}
* {{KV RenderFields}}
{{KV|Linked Door|intn=chainstodoor|target_destination|nofgd=1|Passes the door's {{ent|+use}} inputs and touch events onto a different door, so it also is activated.}}
* {{KV Global}}
{{KV|Block Filter Name|intn=filtername|targetname|only={{hls}}|[[Filter]] to use to determine entities that can block the door.}}
* {{KV Shadow}}
{{KV|Speed|intn=speed|float|Speed that the door moves, in units (sliding door) or degrees (rotating door) per second.}}
* '''speed'''
{{KV|Start Sound|intn=noise1|sound|Sound to play when the door starts opening. Also plays when door starts closing if <tt>startclosesound</tt> is absent.}}
: <integer> Speed that the door moves in units per second.
{{KV|Stop Sound|intn=noise2|sound|Sound to play when the door stops opening. Also plays when door stops closing if <tt>closesound</tt> is absent.}}
* '''wait'''
{{KV|Start Close Sound|intn=startclosesound|sound|Sound to play when the door starts closing.}}
: <float> Time until the door returns to the closed position. A value of 0 means the door never closes.
{{KV|Stop Close Sound|intn=closesound|sound|Sound to play when the door stops closing.}}
* '''lip'''
{{KV|Delay Before Reset|intn=wait|float|Time until the door returns to the closed position. A value of -1 means the door never auto-closes.}}
: <integer> This is the number of units the door is from the frame in the open position.
{{KV|Lip|intn=lip|float|When the door opens, it will move its full length minus this many units. Negative values will make the door move that many more than its length.}}
* '''dmg'''
{{KV|Blocking Damage|intn=dmg|float|Amount of damage done to entities that block the movement of this door, per frame.
: <integer> Damage to deal to objects blocking the door.
:{{bug|hidetested=1|Normally a door will damage things blocking it, however if the player is teleported by a {{ent|trigger_teleport}} while using {{ent|noclip}}, they will not be damaged.}}}}
* '''forceclosed'''
{{KV|Force Closed|intn=forceclosed|bool|Makes the door close no matter what. Useful for doors that have to close even if the player tries to block them with objects.}}
: {{boolean}} Force the door closed even if blocked.
{{KV|Ignore Debris|intn=ignoredebris|bool|Changes the door's [[collision group]] to <code>COLLISION_GROUP_INTERACTIVE</code>, which ignores debris objects. Not compatible with the ''Non-solid to Player'' spawnflag as it also sets a collision group.}}
* '''health'''
{{KV|Health (shoot open)|intn=health|int|In {{Quake|2}}, if this was set, the door would open when it took this much damage. Nonfunctional in most {{Source|2}} games; can be emulated by parenting an invisible {{ent|func_button}} with spawnflag 512 set, and having the button target this door.|deprecated=1}}
: Door can be shot open if nonzero.
{{KV|Message If Triggered|intn=message|string|deprecated=1|In {{Quake|2}} and {{GoldSrc|2}}, if this was set, a message would appear on the the player's hud when the door is locked and they attempt to open the door. Nonfunctional in most {{Source|2}} games; can be emulated by calling an {{ent|env_message}} with the door's {{code|OnLockedUse}} output.}}
* '''locked_sentence'''
{{KV|Locked Sound|intn=locked_sound|sound|Sound played when the player tries to open the door, and fails because it's locked.}}
: <choices> Easy alternative to the ''locked_sound'' keyvalue.
{{KV|Unlocked Sound|intn=unlocked_sound|sound|Sound played when door is unlocked.}}
:{| {{standard-table}}
{{KV|Spawn Position|intn=spawnpos|integer choices|State the door should begin in.
! Literal Value || Description
:*0: Closed
|-
:*1: Open}}
| 0 || None
{{KV|Locked Sentence|intn=locked_sentence|choices|only={{hls}} {{hldms}}|Intercom voiceline for when the player tries to use the door, but it's locked.}}
|-
{{KV|Unlocked Sentence|intn=unlocked_sentence|choices|only={{hls}} {{hldms}}|Intercom voiceline for when the door is unlocked.}}
| 1 || Gen. Access Denied
{{KV|Loop Moving Sound?|intn=loopmovesound|bool|Makes the door's '''Start Sound''' loop until the door finishes moving.
|-
 
| 2 || Security Lockout
:{{bug|hidetested=1|If an [[Looping a Sound|already-looping]] sound is played with this enabled, it can continue forever. Further attempts to open or close the door will only add another looping sample to the noise.}}}}
|-
| 3 || Blast Door
|-
| 4 || Fire Door
|-
| 5 || Chemical Door
|-
| 6 || Radiation Door
|-
| 7 || Gen. Containment
|-
| 8 || Maintenance Door
|-
| 9 || Broken Shut Door
|}
* '''unlocked_sentence'''
: <choices> Easy alternative to the ''unlocked_sound'' keyvalue.
:{| {{standard-table}}
! Literal Value || Description
|-
| 0 || None
|-
| 1 || Gen. Access Granted
|-
| 2 || Security Disengaged
|-
| 3 || Blast Door
|-
| 4 || Fire Door
|-
| 5 || Chemical Door
|-
| 6 || Radiation Door
|-
| 7 || Gen. Containment
|-
| 8 || Maintenance area
|}
* '''loopmovesound'''
: {{boolean}} Loop Moving Sound? - If set to true, the door's ''noise1'' (''Start Sound'') will be continually looped until the door finishes moving. Note that some samples already has a built in loop that isn't used when you play them in the Hammer editor. If such samples are also looped by this keyvalue, they have been known to continue looping forever, and further attempts to open or close the door will only add another looping sample to the noise.
* '''noise1'''
: <sound> Plays when the door opens. / Sound to play when the door starts moving.
* '''noise2'''
: <sound> Plays when the door closes. / Sound to play when the door stops moving.
* '''message'''
: Done on trigger. {{TODO|More info here.}}
* '''locked_sound'''
: <sound> Audio to play when the player tries to open the door and it is locked.
* '''unlocked_sound'''
: <sound> Audio to play when the door becomes unlocked.
* '''_minlight'''
: <integer> Minimum light level.
* '''{{EP1 add|ignoredebris}}'''
: {{boolean}} If set, this will change the door's collision group to one that ignore collisions with debris objects (note that this is not compatible with the non-solid-to-player spawnflag).

Latest revision as of 07:08, 20 May 2025

BaseDoor:

Linked Door (chainstodoor) <targetname> !FGD
Passes the door's +use inputs and touch events onto a different door, so it also is activated.
Block Filter Name (filtername) <targetname> (only in Half-Life: Source)
Filter to use to determine entities that can block the door.
Speed (speed) <float>
Speed that the door moves, in units (sliding door) or degrees (rotating door) per second.
Start Sound (noise1) <sound>
Sound to play when the door starts opening. Also plays when door starts closing if startclosesound is absent.
Stop Sound (noise2) <sound>
Sound to play when the door stops opening. Also plays when door stops closing if closesound is absent.
Start Close Sound (startclosesound) <sound>
Sound to play when the door starts closing.
Stop Close Sound (closesound) <sound>
Sound to play when the door stops closing.
Delay Before Reset (wait) <float>
Time until the door returns to the closed position. A value of -1 means the door never auto-closes.
Lip (lip) <float>
When the door opens, it will move its full length minus this many units. Negative values will make the door move that many more than its length.
Blocking Damage (dmg) <float>
Amount of damage done to entities that block the movement of this door, per frame.
Icon-Bug.pngBug:Normally a door will damage things blocking it, however if the player is teleported by a trigger_teleport while using noclip, they will not be damaged.
Force Closed (forceclosed) <boolean>
Makes the door close no matter what. Useful for doors that have to close even if the player tries to block them with objects.
Ignore Debris (ignoredebris) <boolean>
Changes the door's collision group to COLLISION_GROUP_INTERACTIVE, which ignores debris objects. Not compatible with the Non-solid to Player spawnflag as it also sets a collision group.
Health (shoot open) (health) <integer> Obsolete
Deprecated.
In Quake Quake, if this was set, the door would open when it took this much damage. Nonfunctional in most Source Source games; can be emulated by parenting an invisible func_button with spawnflag 512 set, and having the button target this door.
Message If Triggered (message) <string> Obsolete
Deprecated.
In Quake Quake and GoldSrc GoldSrc, if this was set, a message would appear on the the player's hud when the door is locked and they attempt to open the door. Nonfunctional in most Source Source games; can be emulated by calling an env_message with the door's OnLockedUse output.
Locked Sound (locked_sound) <sound>
Sound played when the player tries to open the door, and fails because it's locked.
Unlocked Sound (unlocked_sound) <sound>
Sound played when door is unlocked.
Spawn Position (spawnpos) <integer choices>
State the door should begin in.
  • 0: Closed
  • 1: Open
Locked Sentence (locked_sentence) <choices> (only in Half-Life: Source Half-Life Deathmatch: Source)
Intercom voiceline for when the player tries to use the door, but it's locked.
Unlocked Sentence (unlocked_sentence) <choices> (only in Half-Life: Source Half-Life Deathmatch: Source)
Intercom voiceline for when the door is unlocked.
Loop Moving Sound? (loopmovesound) <boolean>
Makes the door's Start Sound loop until the door finishes moving.
Icon-Bug.pngBug:If an already-looping sound is played with this enabled, it can continue forever. Further attempts to open or close the door will only add another looping sample to the noise.