SHARE
TWEET

Untitled

a guest Jun 12th, 2019 303 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. func_door
  3. Русский
  4.  
  5. func_door is a brush entity available in all Source games. It creates a simple sliding door.
  6.  
  7. In code, it is represented by class CBaseDoor, defined in doors.cpp.
  8. Contents
  9.  
  10.     1 Keyvalues
  11.     2 Flags
  12.     3 Inputs
  13.     4 Outputs
  14.     5 See Also
  15.  
  16. Keyvalues
  17.  
  18. Move Direction (movedir) <angles>
  19.     The direction in which the door will move when it opens. It will open far enough that it does not occupy the space it spawned in.
  20.  
  21. BaseDoor:
  22.  
  23. Linked Door (chainstodoor) <string> !FGD
  24.     Passes the door's +use inputs and touch events onto a different door, so it also is activated.
  25. Block Filter Name (filtername) <targetname>
  26.     (For Half-Life: Source) Filter to use to determine entities that can block the door.
  27. Speed (speed) <float>
  28.     Speed that the door moves, in units (sliding door) or degrees (rotating door) per second.
  29. Start Sound (noise1) <sound>
  30.     Sound to play when the door starts moving (regardless of opening or closing).
  31. Stop Sound (noise2) <sound>
  32.     Sound to play when the door stops moving (regardless of opening or closing).
  33. Start Close Sound (startclosesound) <sound>
  34.     Sound to play when the door starts closing.
  35. Stop Close Sound (closesound) <sound>
  36.     Sound to play when the door stops closing.
  37. Delay Before Reset (wait) <float>
  38.     Time until the door returns to the closed position. A value of -1 means the door never auto-closes.
  39. Lip (lip) <float>
  40.     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.
  41. Blocking Damage (dmg) <float>
  42.     Amount of damage done to entities that block the movement of this door, per frame.
  43.  
  44. Bug: 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.
  45.  
  46. Force Closed (forceclosed) <boolean>
  47.     Makes the door close no matter what. Useful for doors that have to close even if the player tries to block them with objects.
  48. Ignore Debris (ignoredebris) <boolean>
  49.     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.
  50. Health (health) <integer>
  51.     Deprecated. Do not use.
  52. Message If Triggered (message) <string>
  53.     Deprecated. Do not use.
  54. Locked Sound (locked_sound) <string>
  55.     Sound played when the player tries to open the door, and fails because it's locked.
  56. Unlocked Sound (unlocked_sound) <string>
  57.     Sound played when door is unlocked.
  58. Spawn Position (spawnpos) <choices>
  59.     State the door should begin in.
  60.  
  61.         0: Closed
  62.         1: Open
  63.  
  64. Locked Sentence (locked_sentence) <choices> (Half-Life: Source)
  65.     Intercom voiceline for when the player tries to use the door, but it's locked.
  66. Unlocked Sentence (unlocked_sentence) <choices> (Half-Life: Source)
  67.     Intercom voiceline for when the door is unlocked.
  68. Loop Moving Sound? (loopmovesound) <boolean>
  69.     Makes the door's Start Sound loop until the door finishes moving.
  70.  
  71. Bug: 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.
  72.  
  73. Visible Brush:
  74.  
  75. Minimum Light (_minlight) <float>
  76.     Minimum amount of light to hit this brush. 0 is none, 1 is normal, and 2 is doubled.
  77. Damage Filter Name (damagefilter) <targetname>
  78.     When this entity receives damage, it will filter by this entity.
  79. Render Mode (rendermode) <choices>
  80.     Set a non-standard rendering mode on this entity.
  81.  
  82. Render FX (renderfx) <choices>
  83.     Preset pattern of appearance effects.
  84.  
  85.     To do: 18-21, 25
  86. Render FX / Transparency (0 - 255) (renderamt) <integer>
  87.     Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
  88. Render Color (R G B) (rendercolor) <color255>
  89.     Color tint.
  90. Shadow Cast Distance (shadowcastdist) <integer> !FGD
  91.     Sets how far the entity casts dynamic shadows. 0 means default distance from the shadow_control entity.
  92. Shadows (vrad_brush_cast_shadows) <integer> !FGD
  93.     Determines if this entity will cast lightmap shadows.
  94.  
  95.         0: No shadows
  96.         1: Cast shadows
  97.  
  98. Disable Shadows (disableshadows) <boolean>
  99.     Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
  100. Disable Receiving Shadows (disablereceiveshadows) <boolean>
  101.     Prevent the entity from receiving shadows on itself.
  102. Texture Frame (texframeindex) <integer> !FGD
  103.     The frame number for any animated textures on this entity.
  104. Minimum CPU Level (mincpulevel) <choices> (New with Left 4 Dead)
  105.     A user with a CPU level lower than this will not see this object rendered in-game. It's unclear how the CPU level is decided, but most systems are classified as "high".
  106. Maximum CPU Level (maxcpulevel) <choices> (New with Left 4 Dead)
  107.  
  108.     0: Default
  109.     1: Low
  110.     2: Medium
  111.     3: High
  112.  
  113. Minimum GPU Level (mingpulevel) <choices> (New with Left 4 Dead)
  114. Maximum GPU Level (maxgpulevel) <choices> (New with Left 4 Dead)
  115.  
  116.     0: Default
  117.     1: Very low
  118.     2: Low
  119.     3: Medium
  120.     4: High
  121.  
  122. Brush:
  123.  
  124. Minimum Bounding Box Size (mins) <vector> !FGD
  125.     Co-ordinate of the minimum bounding box corner. The bounding box is drawn from this corner to the other one. Requires Bounding Box collisions (solid 2) to be used. Can be used to overwrite the collision shape of a brush, although it can only be a cuboid.
  126. Maximum Bounding Box Size (maxs) <vector> !FGD
  127.     Co-ordinate of the maximum bounding box corner. The bounding box is drawn from this corner to the other one. Requires Bounding Box collisions (solid 2) to be used. Can be used to overwrite the collision shape of a brush, although it can only be a cuboid.
  128. Collisions (solid) <choices> !FGD
  129.     Method of collision for this entity.
  130.  
  131.         0: None
  132.         1: BSP (QPhysics)
  133.         2: Bounding Box
  134.         3: Oriented Bounding Box
  135.         4: Oriented Bounding Box, constrained to Yaw only
  136.         5: Custom/Test
  137.         6: VPhysics
  138.  
  139. Model Index (modelindex) <short> !FGD
  140.     Changes the entity's model to a precached model on the map.
  141.  
  142. Base:
  143.  
  144. Classname (classname) <string>
  145.     The classname defines the type of entity. Classnames can be changed using AddOutput, which will influence how the engine deals with the entity in certain circumstances.
  146. Name (targetname) <string>
  147.     The name that other entities refer to this entity by.
  148. Global Entity Name (globalname) <string>
  149.     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 globalnames matching entities in the previous map will have the previous map's state copied over their state.
  150. Parent (parentname) <targetname>
  151.     Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma. Every entity can be parented, even point entities. Entities which are parented will be forced to transition to the next map, such as from a trigger_transition. Some entities which aren't intended to be parented may not function correctly. phys_constraint can be used as a workaround to parenting.
  152. Origin (X Y Z) (origin) <coordinates>
  153.     The position of this entity's center in the world. Rotating entities typically rotate around their origin.
  154. Pitch Yaw Roll (X Y Z) (angles) <angle>
  155.     This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
  156.     Note:This works on brush entities, although Hammer doesn't show the new angles.
  157. Flags (spawnflags) <integer>
  158.     Toggles features of an entity, its specific number is determined by the combination of flags added.
  159. Response Contexts (ResponseContext) <string>
  160.     Pre-defined response system contexts for this entity. Format is key:value,key:value,.... Contexts may be filtered.
  161. Effects (effects) <integer> !FGD
  162.     Combination of effect flags to use.
  163. Local Time (ltime) <float> !FGD
  164.     The local time of the entity, independent of the global clock. Used mainly for physics calculations.
  165. Next Think (nextthink) <float> !FGD
  166.     Amount of time before the entity thinks again.
  167. Hammer ID (hammerid) <integer> !FGD
  168.     The entity's Hammer ID. Mainly used by plugins and debugging commands, such as ent_keyvalue. Can be manually assigned with the "hammerid" or "id" keyvalue. Entities spawned at run-time are not assigned any Hammer ID.
  169. Disable for Xbox 360 (disableX360) <boolean> (New with Left 4 Dead 2) !FGD
  170.     If Yes, disables this entity on the Xbox 360 version of Source.
  171. Entity Scripts (vscripts) <scriptlist> (New with Left 4 Dead 2)
  172.     Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
  173. Script think function (thinkfunction) <string> (New with Left 4 Dead 2)
  174.     Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call. Try to avoid expensive operations in this function, as it may cause performance problems.
  175. Lag Compensation (LagCompensate) <boolean> (New with Left 4 Dead 2) !FGD
  176.     Set to Yes to lag compensate this entity. Should be used very sparingly!
  177. Is Automatic-Aim Target (is_autoaim_target) <boolean> (New with Counter-Strike: Global Offensive) !FGD
  178.     If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.
  179.  
  180. Flags
  181.  
  182. BaseDoor:
  183.  
  184.     1: Starts Open - Obsolete. Door behaves more like the doors in Half-Life. Some outputs don't work.
  185.     4: Non-solid to Player - Sets the collision group to COLLISION_GROUP_PASSABLE_DOOR, so the player cannot collide with it while other things can. This is not compatible with Ignore Debris as that also sets a collision group.
  186.     8: Passable - Door is solid to nothing at all.
  187.     32: Toggle - The door is given an input to change this door between open and shut.[Clarify]
  188.     256: Use Opens
  189.     512: NPCs Can't - NPCs can't open this door.
  190.     1024: Touch Opens - When a player or NPC touches the door, it will count as an attempt to open it.
  191.     2048: Starts locked - This door spawns locked and cannot be opened by the player or NPCs (but buttons can still trigger it)
  192.     4096: Door Silent - This door makes no noise.
  193.     65536: New Use rules !FGD - To do: Describe difference..?
  194.  
  195. Inputs
  196.  
  197. Door:
  198.  
  199. Open
  200.     Opens door.
  201. Close
  202.     Closes door.
  203. Toggle
  204.     Opens door if closed, closes door if opened.
  205. Lock
  206.     Prevent door from opening, but can still close.
  207. Unlock
  208.     Allow door to operate as normal.
  209. SetSpeed
  210.     float
  211.  
  212. Visible Brush:
  213.  
  214. Alpha  <integer>
  215.     Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode (rendermode) set to a number other than 0.
  216. AlternativeSorting  <boolean>
  217.     Swaps the rendering order of the entity. Used to attempt to fix sorting problems when rendering, for example an object rendering in front of translucent materials.
  218. Color  <color255>
  219.     Sets an RGB color for the entity.
  220. SetDamageFilter  <targetname>
  221.     Sets a filter for this entity for when it receives damage.
  222. EnableDamageForces
  223.     Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).
  224. DisableDamageForces
  225.     Prevents the entity from being pushed by damage done to it.
  226. EnableShadow
  227.     Allows the entity to draw a render target shadow.
  228. DisableShadow
  229.     Prevents the entity from drawing a render target shadow.
  230. EnableDraw  (New with Portal 2)
  231.     Removes EF_NODRAW from the entity.
  232. DisableDraw  (New with Portal 2)
  233.     Applies EF_NODRAW to the entity. Note that this is different than rendermode 10.
  234. EnableReceivingFlashlight  (New with Portal 2)
  235.     Makes it so that the entity is lit by env_projectedtextures.
  236. DisableReceivingFlashlight  (New with Portal 2)
  237.     Prevents the entity from being lit by env_projectedtextures. The shadow made by the texture will still cast.
  238. EnableDrawInFastReflection  (New with Portal 2)
  239.     Makes the entity be rendered in reflections from water materials using $reflectonlymarkedentities.
  240. DisableDrawInFastReflection  (New with Portal 2)
  241.     Prevents the entity from rendering in fast reflections.
  242.  
  243. Base:
  244.  
  245. Kill
  246.     Removes this entity and any entities parented to it from the world.
  247. KillHierarchy
  248.     Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster than Kill.
  249. SetParent  <string>
  250.     Move with this entity. See Entity Hierarchy (parenting).
  251. SetParentAttachment  <string>
  252.     Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
  253. SetParentAttachmentMaintainOffset  <string>
  254.     As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
  255. ClearParent
  256.     Removes this entity from the the movement hierarchy, leaving it free to move independently.
  257. AddOutput  <string>
  258.     Evaluates a keyvalue/output on this entity.
  259.     Format: <key> <value>
  260.     Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
  261. FireUser1 to FireUser4
  262.     Fire the OnUser outputs; see User Inputs and Outputs.
  263. Use  !FGD
  264.     Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
  265.     This input is not included in Valve's FGDs.
  266. DispatchEffect  <string> !FGD
  267.     Dispatches a special effect from the entity's origin. Removed and replaced entirely by the particle system since <Left 4 Dead>.
  268. DispatchResponse  <string> !FGD
  269.     Dispatches a response to the entity. See Response and Concept.
  270. AddContext  <string>
  271.     Adds to the entity's list of response contexts. Format is <key>:<value>.
  272. RemoveContext  <string>
  273.     Remove a context from this entity's list. The name should match the key of an existing context.
  274. ClearContext  <string>
  275.     Removes all contexts from this entity's list.
  276. RunScriptFile  <script> (New with Left 4 Dead 2)
  277.     Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
  278. RunScriptCode  <string> (New with Left 4 Dead 2)
  279.     Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
  280.     Bug:  In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
  281.     Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
  282. CallScriptFunction  <string> (New with Left 4 Dead 2) !FGD
  283.     Execute a VScript function in the scope of the receiving entity.
  284. SetLocalOrigin  <coordinates> (New with Alien Swarm) !FGD
  285.     Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
  286. SetLocalAngles  <angles> (New with Alien Swarm) !FGD
  287.     Set this entity's angles.
  288.  
  289. Outputs
  290.  
  291. BaseDoor:
  292.  
  293. OnClose
  294.     Fired when the door starts to close.
  295. OnOpen
  296.     Fired when the door starts to open.
  297. OnFullyClosed
  298.     Fired when the door finishes closing. Reversed if Start Open flag is set.
  299. OnFullyOpen
  300.     Fired when the door finishes opening. Reversed if Start Open flag is set.
  301. OnBlockedClosing
  302.     Fired when the door has been blocked from closing. !activator is whatever blocks the door.
  303. OnBlockedOpening
  304.     Fired when the door has been blocked from opening. !activator is whatever blocks the door.
  305. OnUnblockedClosing
  306.     Fired when the door is no longer blocked from closing.
  307. OnUnblockedOpening
  308.     Fired when the door is no longer blocked from opening.
  309. OnLockedUse
  310.     Fired when the player tries to open the door but fails because it is locked.
  311.  
  312. Base:
  313.  
  314. OnUser1 to OnUser4
  315.     These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
  316. OnKilled  (Only in the Left 4 Dead series)
  317.     This output fires when the entity is killed and removed from the game. <Left 4 Dead> only.
  318.  
  319. See Also
  320.  
  321.     func_door_rotating
  322.     prop_door_rotating
  323.     func_lookdoor
  324.     Creating Brush Entities (tutorial using func_door)
  325.  
  326. Categories:
  327.  
  328.     Source Base EntitiesBrush EntitiesEntities
  329.  
  330. Navigation menu
  331.  
  332.     Create account
  333.     Log in
  334.  
  335.     Page
  336.     Discussion
  337.  
  338.     Read
  339.     View source
  340.     View history
  341.  
  342.     Main Page
  343.     Source SDK index
  344.     Recent changes
  345.     Random page
  346.  
  347. Support
  348.  
  349.     Getting help
  350.     Source SDK FAQ
  351.     Level Design FAQ
  352.     SDK Help Forums
  353.  
  354. Steam Community
  355.  
  356.     Source SDK Hub
  357.     Steam Games
  358.  
  359. Tools
  360.  
  361.     What links here
  362.     Related changes
  363.     Special pages
  364.     Printable version
  365.     Permanent link
  366.     Page information
  367.  
  368.     This page was last modified on 7 October 2018, at 02:52.
  369.  
  370.     About Valve Developer Community
  371.     Terms of Use
  372.     Third Party Legal Notices
  373.  
  374.     Powered by MediaWiki
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top