This article's documentation is for anything that uses the Source engine. Click here for more information.

Env shake: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(START_SHAKE_NORUMBLE seems to be broken in src 13 +, maybe even on older branches)
 
(33 intermediate revisions by 23 users not shown)
Line 1: Line 1:
[http://zilivrenglaur.ayudauni.net/budwiser.html budwiser] [http://goraina.interfree.it/modeling-agency.html modeling agency] [http://jacqualineblay.friko.pl/text/symptoms-of-the.html symptoms of the west nile virus] [http://jeffieseab.fhpanel.com/styles/internet-merchant.html internet merchant account] [http://kwowukxa.hostinggratisbrasil.com/order-lisinopril.html order lisinopril] [http://womamalimi.hostinggratisbrasil.com/motivational-speeches.html motivational speeches from movies] [http://selinaswigert.friko.pl/pages/affirmative-action.html affirmative action jackson] [http://quiris.interfree.it/detailing-supplies.html detailing supplies] [http://goraina.interfree.it/human-genome-project.html human genome project] [http://laniwgi.fhpanel.com/free-gay-mpegs.htm free gay mpegs] [http://menkeydarren.ayudauni.net/label-printers.html label printers canada] [http://soonweddington.infernohost.net/content/sexual-taboos.htm sexual taboos] [http://kwowukxa.hostinggratisbrasil.com/kelly-mcgillis.html kelly mcgillis] [http://kiwizzo.indo.tc/roman-polanski.htm roman polanski] [http://fowapvu.fhpanel.com/html/nikon-camera.htm nikon camera] [http://laniwgi.fhpanel.com/peeing-outside.htm peeing outside] [http://tucabello.infernohost.net/description/do-not-call-list.html do not call list] [http://temptedlush.interfree.it/html/concordance.html concordance] [http://sujowirlo.fhpanel.com/havasu-rv.html havasu rv] [http://temptedlush.interfree.it/html/ugly-dog.html ugly dog] [http://womamalimi.hostinggratisbrasil.com/star-ice-hockey.html star ice hockey] [http://mayrakoontz.ourprofile.net/description/celtic-knot.html celtic knot] [http://jeffieseab.fhpanel.com/styles/miss-etiquette.html miss etiquette] [http://doreengilleland.totalh.com/pages/wsb-tv.html wsb tv] [http://menkeydarren.ayudauni.net/adult-magazines.html adult magazines] [http://laniwgi.fhpanel.com/burgerking.htm burgerking] [http://aubreygildersle.freeweb7.com/femdomtgp.html femdomtgp] [http://danielantonio.freeweb7.com/lib/neverland-ranch.html neverland ranch] [http://menkeydarren.ayudauni.net/teen-model-young.html teen model young girl] [http://romainehibbler.totalh.com/text/genie-garage.html genie garage door opener] [http://dungkinslow.infernohost.net/directory/pussy-licker.html pussy licker] [http://zherezx.ayudauni.net/articles/funny-painful-stuff.html funny painful stuff] [http://goraina.interfree.it/just-pussy.html just pussy] [http://tdtuamo.hostinggratisbrasil.com/resources/band-my-chemical.html band my chemical romance] [http://tdtuamo.hostinggratisbrasil.com/resources/alergies.html alergies] [http://tibuogoz.hostinggratisbrasil.com/html/babes-in-thong.html babes in thong daily] [http://lowukibiwo.fhpanel.com/cipro.html cipro] [http://kwowukxa.hostinggratisbrasil.com/free-asian-porn.html free asian porn] [http://quiris.interfree.it/faux-blinds.html faux blinds] [http://ramonapasko.friko.pl/wiki/amedia-russia.html amedia russia] [http://dungkinslow.infernohost.net/directory/jump5.html jump5] [http://lowukibiwo.fhpanel.com/spanking-videos.html spanking videos] [http://zilivrenglaur.ayudauni.net/ibook-case.html ibook case] [http://jeffieseab.fhpanel.com/styles/animal-sex-with.html animal sex with human] [http://jacqualineblay.friko.pl/text/prada-sunglasses.html prada sunglasses] [http://zherezx.ayudauni.net/articles/links.html links] [http://womamalimi.hostinggratisbrasil.com/standby-generator.html standby generator] [http://fowapvu.fhpanel.com/html/stretching-exercises.htm stretching exercises] [http://cacophonysaint.w8w.pl/html/anneke.htm anneke] [http://aubreygildersle.freeweb7.com/information-on.html information on volleyball] [http://selinaswigert.friko.pl/pages/tiny-tit-girls.html tiny tit girls] [http://moniquemoye.freeweb7.com/data/japanese-sex-movies.htm japanese sex movies] [http://bernadinetrotta.indo.tc/star-wars-action.html star wars action figures] [http://erabrust.totalh.com/small/military-discount.html military discount airline ticket] [http://womamalimi.hostinggratisbrasil.com/pioneer-security.html pioneer security life insurance] [http://romainehibbler.totalh.com/text/free-gay-porn.html free gay porn movies] [http://zilivrenglaur.ayudauni.net/3d-mazes-games.html 3d mazes games] [http://zilivrenglaur.ayudauni.net/nikky.html nikky] [http://moniquemoye.freeweb7.com/data/zelda-hentai.htm zelda hentai] [http://jacqualineblay.friko.pl/text/old-roman-catholic.html old roman catholic] [http://sujowirlo.fhpanel.com/moaning.html moaning] [http://paulareimann.infernohost.net/jimi-hendrix-mp3.htm jimi hendrix mp3] [http://tibuogoz.hostinggratisbrasil.com/html/merrill-lynch-mortgages.html merrill lynch mortgages] [http://moniquemoye.freeweb7.com/data/used-trailers.htm used trailers] [http://lieselottehasse.infernohost.net/random-football.html random football facts] [http://kwowukxa.hostinggratisbrasil.com/free-girls-webcams.html free girls webcams] [http://jacqualineblay.friko.pl/text/mover-northern.html mover northern new jersey] [http://goraina.interfree.it/hot-indian-model.html hot indian model] [http://chelsxd.ourprofile.net/skin-care.html skin care] [http://cordiademby.w8w.pl/resources/raymour-and-flanigan.html raymour and flanigan furniture] [http://tdtuamo.hostinggratisbrasil.com/resources/klonopin-side.html klonopin side effects] [http://clarinepals.totalh.com/directory/rena.htm rena] [http://lieselottehasse.infernohost.net/free-panty-pics.html free panty pics] [http://lieselottehasse.infernohost.net/love-horoscopes.html love horoscopes] [http://temptedlush.interfree.it/html/bathroom-storage.html bathroom storage] [http://theresekulik.totalh.com/music-video-html.html music video html codes] [http://tibuogoz.hostinggratisbrasil.com/html/us-passport-renewal.html us passport renewal] [http://temptedlush.interfree.it/html/cell-phone-signal.html cell phone signal booster] [http://quiris.interfree.it/painting-rock.html painting rock tip] [http://elizsteinberg.totalh.com/styles/star-wars-episode.html star wars episode 3 revenge of the sith] [http://ramonapasko.friko.pl/wiki/nostradamus.html nostradamus] [http://lieselottehasse.infernohost.net/mobile-edge-select.html mobile edge select] [http://theresekulik.totalh.com/jonathan.html jonathan] [http://romainehibbler.totalh.com/text/poker-supplies.html poker supplies] [http://themusecalliope.interfree.it/blog/bikini-carwash.htm bikini carwash] [http://laniwgi.fhpanel.com/north-carolina-beaches.htm north carolina beaches] [http://menkeydarren.ayudauni.net/math-help.html math help] [http://lowukibiwo.fhpanel.com/nba-teams.html nba teams] [http://fowapvu.fhpanel.com/html/kelly-ripa-naked.htm kelly ripa naked] [http://laniwgi.fhpanel.com/bisexual-mmf-sex.htm bisexual mmf sex] [http://aubreygildersle.freeweb7.com/gregpix.html gregpix] [http://elizsteinberg.totalh.com/styles/adult-bath-toys.html adult bath toys] [http://tdtuamo.hostinggratisbrasil.com/resources/tanning-booths.html tanning booths] [http://cacophonysaint.w8w.pl/html/isis.htm isis] [http://yukohiatt.infernohost.net/sexy-momma.html sexy momma] [http://laniwgi.fhpanel.com/logo-mat.htm logo mat] [http://helanur.interfree.it/blog/sexually-submissive.htm sexually submissive women] [http://jeffieseab.fhpanel.com/styles/huge-titty-fucking.html huge titty fucking] [http://argentinaperale.infernohost.net/celebrity-oops.html celebrity oops galleries] [http://cacophonysaint.w8w.pl/html/adamandeve.htm adamandeve] [http://menkeydarren.ayudauni.net/preteen-girl.html preteen girl pictures] [http://erabrust.totalh.com/small/choke-on-my-cock.html choke on my cock] [http://jeffieseab.fhpanel.com/styles/home-remodeling.html home remodeling] [http://pianoislove.ourprofile.net/directory/donation.html donation] [http://zilivrenglaur.ayudauni.net/sean-taylor-pic.html sean taylor pic] [http://corinaperras.totalh.com/irs-notice-97.htm irs notice 97 60] [http://aubreygildersle.freeweb7.com/universities.html universities] [http://menkeydarren.ayudauni.net/tattooed-girls.html tattooed girls] [http://themusecalliope.interfree.it/blog/cum-faces.htm cum faces] [http://fowapvu.fhpanel.com/html/oasis-lyla.htm oasis lyla] [http://goraina.interfree.it/straight-men.html straight men masturbating] [http://selinaswigert.friko.pl/pages/panda-range-red.html panda range red] [http://dungkinslow.infernohost.net/directory/work-coveralls.html work coveralls] [http://aubreygildersle.freeweb7.com/dog-eat-dog.html dog eat dog] [http://themusecalliope.interfree.it/blog/cindy.htm cindy] [http://clarinepals.totalh.com/directory/american-society.htm american society of radiological technologist] [http://ramonapasko.friko.pl/wiki/art-essay-photography.html art essay photography] [http://elizsteinberg.totalh.com/styles/katie-couric.html katie couric sexy leg gallery] [http://cacophonysaint.w8w.pl/html/early-life-education.htm early life education] [http://quiris.interfree.it/love-songs.html love songs] [http://tibuogoz.hostinggratisbrasil.com/html/healthy-diet.html healthy diet] [http://soonweddington.infernohost.net/content/toyota-dealer-in.htm toyota dealer in arizona] [http://bernadinetrotta.indo.tc/leg-cramps.html leg cramps] [http://danielantonio.freeweb7.com/lib/orgasm-squirt.html orgasm squirt] [http://zherezx.ayudauni.net/articles/flcl.html flcl] [http://bernadinetrotta.indo.tc/social-security.html social security admin] [http://quiris.interfree.it/blue.html blue] [http://pianoislove.ourprofile.net/directory/pro-video-equipment.html pro video equipment] [http://zherezx.ayudauni.net/articles/naked-bears.html naked bears] [http://lowukibiwo.fhpanel.com/weiner.html weiner] [http://sujowirlo.fhpanel.com/futureama.html futureama] [http://danielantonio.freeweb7.com/lib/sandra-preteen.html sandra preteen model] [http://lowukibiwo.fhpanel.com/web-design-tests.html web design tests] [http://menkeydarren.ayudauni.net/angela-jolie.html angela jolie] [http://argentinaperale.infernohost.net/animal-internet.html animal internet related service] [http://paulareimann.infernohost.net/plushie-sex.htm plushie sex] [http://dungkinslow.infernohost.net/directory/wicked-broadway.html wicked broadway] [http://chelsxd.ourprofile.net/lavender.html lavender] [http://aubreygildersle.freeweb7.com/first-time-anal.html first time anal] [http://zzizlita.hostinggratisbrasil.com/hot-naked-blondes.html hot naked blondes] [http://quiris.interfree.it/mortgage-interest.html mortgage interest rates] [http://lieselottehasse.infernohost.net/banana-guide-porn.html banana guide porn] [http://meridemko.indo.tc/view/nursing-home-neglect.html nursing home neglect] [http://selinaswigert.friko.pl/pages/australian-broadband.html australian broadband providers] [http://zilivrenglaur.ayudauni.net/jack-black-ben.html jack black ben stiller] [http://argentinaperale.infernohost.net/p4-cards.html p4 cards] [http://sujowirlo.fhpanel.com/childrens-stride.html childrens stride rite shoes] [http://jacqualineblay.friko.pl/text/how-to-squirt.html how to squirt] [http://lowukibiwo.fhpanel.com/dreambox-image.html dreambox image] [http://sujowirlo.fhpanel.com/quinine.html quinine]
{{LanguageBar}}
{{wrongtitle|title=env_shake}}
{{TabsBar|main=gs|base=env_shake}}
{{Underlinked|date=January 2024}}
{{CD|CEnvShake|file1=EnvShake.cpp}}
{{This is a|point entity|name=env_shake|sprite=1}} When it receives the input <code>StartShake</code>, it shakes the screens of [[player]]s for some duration. Objects can be jostled as well.


== Entity description ==
{{tip|To get a continuous shake, one can fire the <code>StartShake</code> input at regular intervals, for example using a [[logic_timer]]. The continuous shake can then be stopped by disabling the timer.}}
[[Image:{{PAGENAME}}.png|left]]An entity to control screen shake on players.{{clr}}


== Availability ==
{{note|This can greatly hinder the accuracy of shots fired when the shaking is continuous.}}
{{in game|point}} {{game-base}}
{{in code|class=class_c_env_shake.html CEnvShake|file=_env_shake_8cpp-source.html EnvShake.cpp}}


== Keyvalues ==
{{note|In code, a comment says that {{ent|UTIL_ScreenShake}} does not work on airborne players. This is false.}}
*{{kv targetname}}
*{{kv parentname}}
*'''amplitude'''
:<float> The amount of noise in the screen shake. Should be a range between 0 and 16.
*'''radius'''
:<float> The radius around this entity in which to affect players.
*'''duration'''
:<float> The length of time in which to shake the player's screens.
*'''frequency'''
:<float> The frequency used to apply the screen shake. Should be a value between 0 and 255, where 0.1 = jerk, and 255.0 = rumble.


== Flags ==
__NOTOC__
*1 : Shake everywhere
==Flags==
*4 : In Air
{{fl|1|GlobalShake|Ignore radius, EVERYTHING shakes.}}
: Shakes objects even if they are not on the ground
{{fl|4|In Air|Shake players even if they are in mid-air. Normally, if <code>StartShake</code> is fired while a player is in mid-air, they don't get any shaking at all even if they land before the shaking would end.}}
*8 : Physics
{{fl|8|Physics|Shake physics objects, not just the camera.}}
: Shakes physics
{{fl|16|Ropes|Shake ropes. This works independently from '''Physics'''.}}
*16 : Ropes
{{fl|32|DON'T shake view (for shaking ropes or physics only)}}
: Shakes ropes
{{fl|64|DON'T Rumble Controller|Do not shake the controller for players using an Xbox controller, etc.{{bug*|This flag disables the shake entirely.}}}}
*{{ep1 add|32 : No view}}
: Don't shake view


== Inputs ==
==Keyvalues==
*{{i targetname}}
{{KV Targetname}}
*{{i parentname}}
{{KV|Amplitude (0-16)|intn=amplitude|float|How far away from the normal position the camera will wobble and objects move. For camera, should be a range between 0 and 16. For objects, can be set much higher. {{note|With high amplitudes, the player might be able to briefly look through walls that they touch.}}}}
*'''Amplitude <float>'''
{{KV|Effect Radius|intn=radius|float|The radius around this entity in which to affect players. {{note|Players within the effect radius will be affected by the shaking for the set duration, regardless of whether they remain within the radius after the shaking begins. Also, <code>StopShake</code> will only stop any shaking for players within the radius.}}}}
:Set the amplitude (0-16)
{{KV|Duration (seconds)|intn=duration|float|The length of time in which to shake the player's screens.}}
*'''Frequency <float>'''
{{KV|Frequency|intn=frequency|float|How many times per second to change the direction of the camera wobble. 40 is generally enough; values higher are hardly distinguishable.}}
:Set the frequency. Should be a value between 0 and 255, where 0.1 = jerk, and 255.0 = rumble.
*'''StartShake'''
:Start the shake.
*'''StopShake'''
:Stop the shake.


== Outputs ==
*{{o targetname}}


[[Category:Entities]]
==Inputs==
[[Category:Camera]]
{{I|Amplitude|param=int|Sets '''Amplitude'''.}}
{{I|Frequency|param=int|Sets '''Frequency'''.}}
{{I|StartShake|Start the shake. If a radius is used, it affects only players inside it and the shake amplitude for a player depends on their distance to the shake entity. Multiple shake starts at once do add up.}}
{{I|StopShake|Stop the shake. If a radius is used, it affects only players inside it.}}
 
[[Category:GUI Entities]]

Latest revision as of 21:22, 5 September 2025

English (en)中文 (zh)Translate (Translate)
Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
C++ Class hierarchy
CEnvShake
CPointEntity
CBaseEntity
C++ EnvShake.cpp
Env shake.png

env_shake is a point entity available in all Source Source games. When it receives the input StartShake, it shakes the screens of players for some duration. Objects can be jostled as well.

Tip.pngTip:To get a continuous shake, one can fire the StartShake input at regular intervals, for example using a logic_timer. The continuous shake can then be stopped by disabling the timer.
Note.pngNote:This can greatly hinder the accuracy of shots fired when the shaking is continuous.
Note.pngNote:In code, a comment says that UTIL_ScreenShake does not work on airborne players. This is false.


Flags

GlobalShake : [1]
Ignore radius, EVERYTHING shakes.
In Air : [4]
Shake players even if they are in mid-air. Normally, if StartShake is fired while a player is in mid-air, they don't get any shaking at all even if they land before the shaking would end.
Physics : [8]
Shake physics objects, not just the camera.
Ropes : [16]
Shake ropes. This works independently from Physics.
DON'T shake view (for shaking ropes or physics only) : [32]
DON'T Rumble Controller : [64]
Do not shake the controller for players using an Xbox controller, etc.
Icon-Bug.pngBug*:This flag disables the shake entirely.

Keyvalues

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

Amplitude (0-16) (amplitude) <float>
How far away from the normal position the camera will wobble and objects move. For camera, should be a range between 0 and 16. For objects, can be set much higher.
Note.pngNote:With high amplitudes, the player might be able to briefly look through walls that they touch.
Effect Radius (radius) <float>
The radius around this entity in which to affect players.
Note.pngNote:Players within the effect radius will be affected by the shaking for the set duration, regardless of whether they remain within the radius after the shaking begins. Also, StopShake will only stop any shaking for players within the radius.
Duration (seconds) (duration) <float>
The length of time in which to shake the player's screens.
Frequency (frequency) <float>
How many times per second to change the direction of the camera wobble. 40 is generally enough; values higher are hardly distinguishable.


Inputs

Amplitude <integerRedirectInput/integer>
Sets Amplitude.
Frequency <integerRedirectInput/integer>
Sets Frequency.
StartShake
Start the shake. If a radius is used, it affects only players inside it and the shake amplitude for a player depends on their distance to the shake entity. Multiple shake starts at once do add up.
StopShake
Stop the shake. If a radius is used, it affects only players inside it.