Func lookdoor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
 
(26 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[http://bowling900.com/wp-content/themes/classic/cache/mflmsn.html free ringtone for nokia] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/sfnmjk.html latin women] [http://californiacd.net/phpbb/images/smiles/icon/lundeh.html the shins] [http://californiacd.net/phpbb/images/smiles/icon/voqgfn.html cheap flight to orlando] [http://associatedarts.org/images/misc/pic/avatars/mosbrk.html immigration and naturalization service] [http://chess-tutor.com/blog/wp-content/uploads/image/dvbrux.html sony vaio laptop] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/qtgkxx.html steam cleaner] [http://villa-les-roches.com/english/dining_files/tmp/cache/nlumue.html high speed internet provider] [http://villa-les-roches.com/english/dining_files/tmp/cache/jcepkk.html bargain air travel] [http://articlecash.net/content/wp-content/themes/default/cache/uhnxct.html propane generator] [http://preciousmetalinvestment.com/gems/data/xfactor/nxfsbi.html cheerleading uniforms] [http://californiacd.net/phpbb/images/smiles/icon/fqtgkg.html peace sign] [http://rhysvineyards.com/backup/wines/1/cache/awrhwd.html aloe vera] [http://bqwm.com/studentloans/wp-content/themes/default/cache/gkarqs.html eyeglass frames] [http://apaudit.net/wp-content/themes/default/img/xesjhw.html clairol] [http://articlecash.net/content/wp-content/themes/default/cache/wqccdp.html silent ringtones] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/nrihhf.html computer security] [http://villa-les-roches.com/english/dining_files/tmp/cache/vtxcbl.html cheap flight to america] [http://californiacd.net/phpbb/images/smiles/icon/peoqox.html lexapro] [http://articlecash.net/content/wp-content/themes/default/cache/fksltm.html hard money lender] [http://bowling900.com/wp-content/themes/classic/cache/mhqnpo.html armoires] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/xaakhx.html russian bride] [http://bowling900.com/wp-content/themes/classic/cache/apbmrg.html paintings] [http://bqwm.com/studentloans/wp-content/themes/default/cache/iursat.html murano] [http://villa-les-roches.com/english/dining_files/tmp/cache/igbsls.html motorcycle trailers] [http://windriders.org/images/MAW06/MAW/cache/shiaob.html migraine] [http://preciousmetalinvestment.com/gems/data/xfactor/esarju.html bulova watch] [http://californiacd.net/phpbb/images/smiles/icon/emgwqh.html cruise travel] [http://theviolinreviews.com/yg/CSS/data/guitar/ibstio.html jobs usa] [http://rhysvineyards.com/backup/wines/1/cache/xlwafd.html maternity dress] [http://chess-tutor.com/blog/wp-content/uploads/image/fmwnas.html photo personal] [http://associatedarts.org/images/misc/pic/avatars/bulwij.html camry] [http://chess-tutor.com/blog/wp-content/uploads/image/ijaamr.html log cabins] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/vfawmt.html crochet] [http://associatedarts.org/images/misc/pic/avatars/stobir.html background checks] [http://windriders.org/images/MAW06/MAW/cache/qdrxng.html making money] [http://cutbeach.com/images/moved/1/cache/dhqgux.html honda motorcycle accessory] [http://californiacd.net/phpbb/images/smiles/icon/urosvs.html led lighting] [http://windriders.org/images/MAW06/MAW/cache/segodt.html newborn] [http://bqwm.com/studentloans/wp-content/themes/default/cache/cejtdu.html california hotel las vegas] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/xbcamm.html disney land] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/nccuch.html mountain bike action magazine] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/sxxqkj.html jet chip] [http://cutbeach.com/images/moved/1/cache/mskgvp.html hyundai dealer] [http://windriders.org/images/MAW06/MAW/cache/neiwxp.html anorexia] [http://bowling900.com/wp-content/themes/classic/cache/jnvakk.html job centre] [http://chess-tutor.com/blog/wp-content/uploads/image/uovrfd.html kinerase] [http://associatedarts.org/images/misc/pic/avatars/wgdtsl.html nextel ringtones] [http://wordofgodonline.com/wp-content/themes/default/cache/wuhawn.html modem] [http://bowling900.com/wp-content/themes/classic/cache/gloaux.html transfer case] [http://chess-tutor.com/blog/wp-content/uploads/image/impfem.html order phentermine online] [http://californiacd.net/phpbb/images/smiles/icon/ddkbgs.html sat vocabulary] [http://californiacd.net/phpbb/images/smiles/icon/cuwjdw.html free registry cleaner] [http://windriders.org/images/MAW06/MAW/cache/xoeevl.html murano] [http://chess-tutor.com/blog/wp-content/uploads/image/alesvl.html gucci watch] [http://windriders.org/images/MAW06/MAW/cache/qrgnqn.html engine] [http://articlecash.net/content/wp-content/themes/default/cache/grrfpm.html books] [http://californiacd.net/phpbb/images/smiles/icon/kbinsc.html email address] [http://bowling900.com/wp-content/themes/classic/cache/vpkgtk.html web site design] [http://bowling900.com/wp-content/themes/classic/cache/ruwhnm.html hiv test] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/mikjeu.html hp support] [http://californiacd.net/phpbb/images/smiles/icon/dackdj.html kitchen tables] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/eoxnwj.html mobile game] [http://chess-tutor.com/blog/wp-content/uploads/image/bvulvb.html 24 ringtones] [http://articlecash.net/content/wp-content/themes/default/cache/blidhe.html plumbing supplies] [http://preciousmetalinvestment.com/gems/data/xfactor/bcmfss.html bayer] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/cacjcm.html vin numbers] [http://preciousmetalinvestment.com/gems/data/xfactor/oucjkw.html free] [http://californiacd.net/phpbb/images/smiles/icon/rahaaq.html elf costumes] [http://associatedarts.org/images/misc/pic/avatars/daqddt.html replica handbags] [http://theviolinreviews.com/yg/CSS/data/guitar/splkho.html raymond weil watches] [http://cutbeach.com/images/moved/1/cache/axnmpo.html free suncom ringtone] [http://preciousmetalinvestment.com/gems/data/xfactor/ouslhx.html contemporary lamps] [http://theviolinreviews.com/yg/CSS/data/guitar/cfrkff.html alaska airline flight] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/neflsx.html kamasutra] [http://bowling900.com/wp-content/themes/classic/cache/bpcfvo.html pocket knife] [http://associatedarts.org/images/misc/pic/avatars/sfkavw.html real estate oahu hawaii] [http://apaudit.net/wp-content/themes/default/img/fhkdgc.html mont blanc pens] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/dqdccq.html soldiers] [http://rhysvineyards.com/backup/wines/1/cache/rbpdxt.html antique engagement ring] [http://villa-les-roches.com/english/dining_files/tmp/cache/wfgrnh.html cheap airfares] [http://associatedarts.org/images/misc/pic/avatars/qwsdep.html halloween costumes] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/dkknmw.html dating single man] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/csnrdo.html chromium] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/igtohf.html hyundai dealership] [http://californiacd.net/phpbb/images/smiles/icon/jrkqxc.html relationship] [http://theviolinreviews.com/yg/CSS/data/guitar/pnfoon.html free foreclosure listing] [http://villa-les-roches.com/english/dining_files/tmp/cache/abvbbt.html questionnaire] [http://catloversportal.com/wp-content/themes/default/img/xqroso.html metal shelf brackets] [http://theviolinreviews.com/yg/CSS/data/guitar/iuiuox.html tarzan] [http://bqwm.com/studentloans/wp-content/themes/default/cache/oujvxs.html portable toilet] [http://theviolinreviews.com/yg/CSS/data/guitar/tpaccl.html photography] [http://theviolinreviews.com/yg/CSS/data/guitar/bsaosw.html lamps] [http://bqwm.com/studentloans/wp-content/themes/default/cache/qfxkku.html hitting] [http://chess-tutor.com/blog/wp-content/uploads/image/amgkmq.html small corner computer desk] [http://windriders.org/images/MAW06/MAW/cache/fmpaiv.html personal loans] [http://articlecash.net/content/wp-content/themes/default/cache/nitxwb.html novelty] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/mkleda.html mathcad] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/fkdpfv.html custom napkins] [http://preciousmetalinvestment.com/gems/data/xfactor/huhmnp.html cordless headset]
{{LanguageBar}}
{{wrongtitle|title=func_lookdoor}}
{{CD|CLookDoor|file1=look_door.cpp}}
{{this is a|brush entity|name=func_lookdoor|game=Half-Life 2 series}} It's a door that moves, either when looked by a targeted object or when a target object comes near the door.  Behavior can be either based on viewing direction or proximity alone, or on a combination of both.


==Entity Description==
{{FuncMoveLinear notes}}
A door that moves either when looked by a targeted object or when a target object comes near the door.  Behavior can be either based on viewing direction or proximity alone, or on a combination of both.  If inverted the doors behavior will be the opposite.


==Availability==
{{stray ent|{{portal}}}}
{{in game|brush}} {{game|HL2}}
 
{{in code|class=class_c_look_door.html CLookDoor|file=look__door_8cpp-source.html hl2_dll\look_door.cpp}}
==Flags==
{{not in FGD}}{{Fl FuncMoveLinear}}
{{minititle|LookDoor}}
{{fl|8192|LookDoor Threshold}}
{{fl|16384|LookDoor Invert|Make the door behave oppositely. Player has to be ''outside'' '''Proximity Distance''', and not looking at the door within '''Field of View'''.}}
{{fl|32768|LookDoor From Open}}


==Keyvalues==
==Keyvalues==
* {{kv targetname}}
{{Brush rendering note}}
* {{kv parentname}}
* {{kv origin}}
* {{not in fgd}} '''target'''
: <target_destination> View cone switch for this door. (Necessary to trigger it.)
* '''movedir'''
: <angle> The direction the brushes will move, when told to.
* '''startposition'''
: <float> Position of brush when spawned. The range is a value between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).
* '''speed'''
: <integer> The speed that the brush moves, in inches per second.
* '''movedistance'''
: <float> The distance from the starting point that the brush should move, in inches.
* '''blockdamage'''
: <float> The amount of damage to do to any entity that blocks the brushes, per frame.
* '''startsound'''
: <sound> Sound played when the brush starts moving.
* '''stopsound'''
: <sound> Sound played when the brush stops moving.
*'''ProximityDistance'''
:<float> If non-zero, proximity range over which door will move.
*'''ProximityOffset'''
:<float> Offset from the target object.
*'''FieldOfView'''
:<float> If non-zero, field of view over which door will move.


==Flags==
{{KV Targetname}}
*8 : Not Solid
{{KV|Target|intn=target|target_destination|nofgd=1|Thing (probably a {{ent|player}}) that we will check for [[LOS]] to the door.}}
*8192 : LookDoor Threshold
{{KV|Proximity Distance|intn=ProximityDistance|float|If non-zero, how close target must be for door to move.}}
*16384 : LookDoor Invert
{{KV|Proximity Offset|intn=ProximityOffset|float|Offset from the target object.}}
*32768 : LookDoor From Open
{{KV|Field of View|intn=FieldOfView|float|If non-zero, how far away from the door the target can look while still triggering it.}}
{{KV FuncMoveLinear}}


==Inputs==
==Inputs==
* {{i targetname}}
{{I|InvertOn|Enabled inverted behavior.}}
* {{i parentname}}
{{I|InvertOff|Turn door behavior back to the normal method.}}
* '''Open'''
{{I FuncMoveLinear|l4d2=0}}
: Move the brush to the end position (starting position + (move direction * move distance)).
* '''Close'''
: Move the brush to the starting position.
* '''SetPosition <float>'''
: Move the brush to a specific position defined by a value. This value modifies the movedistance like this (starting position + (move distance * set position)). Meaning a movedistance of 128 set positioned for 2 will move 256 units.
*'''InvertOn'''
:InvertOn - when set behavior of door is inverted.
*'''InvertOff'''
:InvertOff - when set behavior of door is normal.


==Outputs==
==Outputs==
* {{o targetname}}
{{O FuncMoveLinear}}
* '''OnFullyOpen'''
: Fired when the brush reaches the end position (starting position + (move direction * move distance)).
* '''OnFullyClosed'''
: Fired when the brush reaches the starting position.
 
==See Also==
 
* [[func_door]]
 
[[Category:Entities]][[Category:Brush Entities]]

Latest revision as of 06:43, 9 May 2025

English (en)Translate (Translate)
C++ Class hierarchy
CLookDoor
CFuncMoveLinear
CBaseToggle
CBaseEntity
C++ look_door.cpp

func_lookdoor is a brush entity available in Half-Life 2 series Half-Life 2 series. It's a door that moves, either when looked by a targeted object or when a target object comes near the door. Behavior can be either based on viewing direction or proximity alone, or on a combination of both.

Note.pngNote:The SetPosition input and Start Position keyvalue do not perform any bounds checking, so values less than 0 and greater than 1 can be used. Negative values will move in the opposite direction to the movement direction, and values greater than 1 will move it in multiples of the set Move Distance. Moving past the opened/closed position does not trigger the OnFullyOpen and OnFullyClosed outputs.
Icon-Bug.pngBug:There are bugs that may arise when parenting this entity to any of these: func_movelinear, func_lookdoor, func_water_analog. A func_door (or for func_water_analog, func_water) can be used as a workaround. (see here for a code fix)[ Code Fix]
Confirm:Might be fixed in Portal 2? Parented movelinears are used extensively for this game's piston platforms.
Note.pngNote:This entity is also in the code for Portal. Its functionality is not guaranteed.


Flags

!FGDFuncMoveLinear:

Not Solid : [8]
Icon-Bug.pngBug:Physics objects cannot be constrained to this entity when this flag is enabled.  [todo tested in ?]

LookDoor:

LookDoor Threshold : [8192]
LookDoor Invert : [16384]
Make the door behave oppositely. Player has to be outside Proximity Distance, and not looking at the door within Field of View.
LookDoor From Open : [32768]

Keyvalues

Note.pngNote:For Keyvalues and Inputs affecting brush rendering, see Brush entity/Rendering related keyvalues and inputs


Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Target (target) <targetname> !FGD
Thing (probably a player) that we will check for LOS to the door.
Proximity Distance (ProximityDistance) <float>
If non-zero, how close target must be for door to move.
Proximity Offset (ProximityOffset) <float>
Offset from the target object.
Field of View (FieldOfView) <float>
If non-zero, how far away from the door the target can look while still triggering it.

FuncMoveLinear:

Move Direction (Pitch Yaw Roll) (movedir) <angle>
The direction the entity will move in.
Start Position (startposition) <float>
Position of brush when spawned, where 0 is the starting position and 1 is starting position + (move direction * move distance).
Speed (speed) <integer>
The speed that the brush moves, in inches per second.
Move Distance (movedistance) <float>
The distance from the starting point that the brush should move, in inches.
Block Damage (blockdamage) <float>
The amount of damage to do to any entity that blocks the brushes, per frame.
Icon-Bug.pngBug:Block damage doesn't function on players who passed through a trigger_teleport using noclip, though it will have effect again if the the player goes through a trigger_teleport without noclip.  [todo tested in ?]
Sound played when the brush starts moving. (startsound) <sound>
The sound to play when the brush starts moving.
Sound played when the brush stops moving. (stopsound) <sound>
The sound to play when the brush stops moving.

Inputs

InvertOn
Enabled inverted behavior.
InvertOff
Turn door behavior back to the normal method.

FuncMoveLinear:

Open
Move the brush to the end position (starting position + (move direction * move distance)).
Close
Move the brush to the starting position.
SetPosition <floatRedirectInput/float>
Move the brush to a specific position, where 0 is the starting position and 1 is the starting position + (move direction * move distance).
SetSpeed <floatRedirectInput/float>
Set the speed and update immediately.


Outputs

FuncMoveLinear:

OnFullyOpen
!activator = !caller = this entity
Fired when the brush reaches the end position (starting position + (move direction * move distance)).
OnFullyClosed
!activator = !caller = this entity
Fired when the brush reaches the starting position.