Revision Difference
util.ScreenShake#551623
<function name="ScreenShake" parent="util" type="libraryfunc">
<description>Makes the screen shake.
<note>The screen shake effect is rendered by modifying the view origin on the client. If you override the view origin in <page>GM:CalcView</page> you may not be able to see the shake effect.</note></description>
<realm>Shared</realm>
<args>
<arg name="pos" type="Vector">The origin of the effect.
<note>Does nothing on client.</note>
</arg>
<arg name="amplitude" type="number">The strength of the effect. How far away from its origin the camera will move while shaking.</arg>
<arg name="frequency" type="number">How many times per second to change the direction of the camera wobble. 40 is generally enough; values higher are hardly distinguishable.</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.
<note>Does nothing on client.</note>
</arg>
<arg name="airshake" type="boolean" default="false">whether players in the air should also be affected.</arg>⤶
</args>
</function>
<example>
<description>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.</description>
<code>util.ScreenShake( Vector(0, 0, 0), 5, 5, 10, 5000 )</code>
</example>