Garry's Mod Wiki

Revision Difference

util.ScreenShake#512295

<function name="ScreenShake" parent="util" type="libraryfunc">⤶ <description>Makes the screen shake</description>⤶ <realm>Shared</realm>⤶ <args>⤶ <arg name="pos" type="Vector">The origin of the effect.&#xA;&#xA;&lt;note&gt;Does nothing on client.&lt;/note&gt;</arg>⤶ <arg name="amplitude" type="number">The strength of the effect</arg>⤶ <arg name="frequency" type="number">The frequency of the effect in hz</arg>⤶ <arg name="duration" type="number">The duration of the effect in seconds</arg>⤶ <arg name="radius" type="number">The range from the origin within which views will be affected, in Hammer Units&#xA;&#xA;&lt;note&gt;Does nothing on client.&lt;/note&gt;</arg>⤶ </args>⤶ </function>⤶ ⤶ <example>⤶ <description>This will shake the screen, from the position 0 0 0 and 5000 units away, with 5 amp, frequency 5, for 10 seconds.</description>⤶ <code>util.ScreenShake( Vector(0,0,0), 5, 5, 10, 5000 )</code>⤶ ⤶ </example>