Env shake: Difference between revisions
Jump to navigation
Jump to search
Note:This can greatly hinder the accuracy of shots fired when the shaking is continuous.
Note:In code, a comment says that UTIL_ScreenShake does not work on airborne players. This is false.
m (Clarification on the "Radius" keyvalue.) |
|||
Line 18: | Line 18: | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV|Amplitude (0-16) (amplitude)|float|How far away from the normal position the camera will wobble. Should be a range between 0 and 16.}} | {{KV|Amplitude (0-16) (amplitude)|float|How far away from the normal position the camera will wobble. Should be a range between 0 and 16.}} | ||
{{KV|Effect Radius (radius)|float|The radius around this entity in which to affect players.{{ | {{KV|Effect Radius (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.}}}} | ||
{{KV|Duration (seconds) (duration)|float|The length of time in which to shake the player's screens.}} | {{KV|Duration (seconds) (duration)|float|The length of time in which to shake the player's screens.}} | ||
{{KV|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.}} | {{KV|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.}} |
Revision as of 16:46, 11 April 2019
Template:Base point It shakes the screens of players. Objects can be jostled as well.


Flags
- 1: GlobalShake - Ignore radius, EVERYTHING shakes.
- 4: In Air - Shake players in air.
- 8: Physics - Shake physics objects, not just the camera.
- 16: Ropes - Shake ropes. (Works independently from Physics.)
- 32: DON'T shake view (for shaking ropes or physics only)
- 64: DON'T Rumble Controller - Do not shake the controller for players using an Xbox controller, etc.
Keyvalues
- Amplitude (0-16) (amplitude) ([todo internal name (i)]) <float>
- How far away from the normal position the camera will wobble. Should be a range between 0 and 16.
- Effect Radius (radius) ([todo internal name (i)]) <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.
- Duration (seconds) (duration) ([todo internal name (i)]) <float>
- The length of time in which to shake the player's screens.
- Frequency (frequency) ([todo internal name (i)]) <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 <integer >
- Sets Amplitude.
- Frequency <integer >
- Sets Frequency.
- StartShake
- Start the shake.
- StopShake
- Stop the shake.