Garry's Mod Wiki

util.ScreenShake

util.ScreenShake

  util.ScreenShake( Vector pos, number amplitude, number frequency, number duration, number radius )

Description

Makes the screen shake.

The screen shake effect is rendered by modifying the view origin on the client. If you override the view origin in GM:CalcView you may not be able to see the shake effect.

Arguments

1 Vector pos
The origin of the effect.

Does nothing on client.
2 number amplitude
The strength of the effect.
3 number frequency
The frequency of the effect in hertz.
4 number duration
The duration of the effect in seconds.
5 number radius
The range from the origin within which views will be affected, in Hammer units.

Does nothing on client.

Example

This will shake the screen, from the position 0, 0, 0 (X, Y, Z) and 5000 units away, with 5 amp, frequency 5, for 10 seconds.

util.ScreenShake( Vector(0, 0, 0), 5, 5, 10, 5000 )

Special Pages


Wikis

?

Render Time: 25ms

DB GetPage 3
Generate Html 6
SaveChanges (1) 6
Render Body 0
Render Sidebar 7