# Shake Camera

Grammar — Shake the camera for player player for duration seconds, with strength strength, frequency frequency Hz, and random% randomness (Position: position, Direction: direction)
FlagsNative | Action

Shakes the camera. If the Duration parameter is set to 0, it will shake the camera until stopped by the “Stop Shaking Camera” action. This action is useful for things such as explosions or earthquakes.

# Arguments

  • int — Player
  • int [ preset::CameraPosition ] — Position
  • int [ preset::CameraDirection ] — Direction
  • fixed — Strength
  • fixed — Frequency
  • fixed — Random
  • fixed — Duration

Returns — void

native void CameraShakeStart(
	int player,
	int position,
	int direction,
	fixed amplitude,
	fixed frequency,
	fixed randomPercent,
	fixed duration,
);

Category: Camera / Camera Tricks

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L5422
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionXY, 0.5, 1.0, 100.0, 0.0)
// L5424
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionXY, 0.25, 0.5, 100.0, 0.0)
// L5426
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionXY, 0.125, 0.25, 100.0, 0.0)
// L3619
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionZ, 0.02, 2.0, 100.0, 3.0)
// L5380
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 2.0, 100.0, 1.0)
// L1910
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L1947
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L2100
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L2140
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L2180
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L2221
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L4542
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L5932
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L6063
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L6084
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L1804
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.02, 2.0, 100.0, 2.0)
// L2514
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3064
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3072
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3080
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3117
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3125
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3133
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3141
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3178
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3186
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L37462
CameraShakeStart(1, c_cameraPositionEye, c_cameraDirectionZ, 0.01, 0.009, 0.0, 100.0)
// L37463
CameraShakeStart(1, c_cameraPositionEye, c_cameraDirectionY, 0.01, 0.0062, 0.0, 100.0)
// L37464
CameraShakeStart(1, c_cameraPositionEye, c_cameraDirectionX, 0.01, 0.005, 0.0, 100.0)
// L37465
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionZ, 0.02, 0.009, 0.0, 100.0)
// L37466
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionY, 0.02, 0.0062, 0.0, 100.0)
// L37467
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionX, 0.02, 0.005, 0.0, 100.0)
// L2789
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.05, 2.0, 100.0, 3.0)
// L2812
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 4.0)
// L2833
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 4.0)
// L2835
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 2.0)
// L3067
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.05, 2.0, 100.0, 4.0)
// L1006
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.2, 2.0, 100.0, 2.0)
// L1776
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.2, 2.0, 100.0, 3.534)
// L1863
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.2, 2.0, 100.0, 3.534)
// L824
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.2, 2.0, 100.0, 2.0)
// L1398
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.2, 2.0, 100.0, 2.0)
// L6692
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 2.0, 100.0, 1.25)
// L1433
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 1.0, 100.0, 2.0)
// L1770
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 1.0, 100.0, 2.0)
// L1867
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 1.0, 100.0, 2.0)
// L2472
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 1.0, 100.0, 2.0)
// L2638
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 1.0, 100.0, 2.0)
// L3037
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 2.0)
// L4951
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.02, 2.0, 100.0, 3.0)
// L5182
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 1.0, 100.0, 2.0)
// L5228
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 1.0, 100.0, 2.0)
// L5274
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 1.0, 100.0, 2.0)
// L4663
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 3.0)
// L5269
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 2.0)
// L5456
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 5.0)
// L6410
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.125, 2.5, 100.0, 3.0)
// L6523
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 2.0)
// L7074
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 1.5)
// L7168
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 1.5)
// L7218
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 1.5)
// L7262
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.125, 2.5, 100.0, RandomFixed(2.0, 4.0))
// L7804
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.2, 2.5, 100.0, RandomFixed(2.0, 4.0))
// L5720
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 4.0)
// L5725
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 4.0)
// L5731
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 6.0)
// L5734
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 3.0)
// L6924
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 8.0)
// L6931
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 4.0)
// L6936
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 4.0)
// L6942
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 6.0)
// L6945
CameraShakeStart(gv_pLAYER_P01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.1, 2.0, 100.0, 3.0)
// L3179
CameraShakeStart(gv_pLAYER_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.03, 2.0, 100.0, 3.0)
// L5286
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 3.0)
// L7083
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionZ, 0.06, 2.0, 100.0, 3.0)
// L2515
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L2563
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L2611
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L4454
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.3, 2.0, 100.0, 10.0)
// L4339
CameraShakeStart(gv_p01_PLAYER, c_cameraPositionTarget, c_cameraDirectionZ, 0.02, 2.0, 100.0, 3.0)
// L4413
CameraShakeStart(gv_p01_PLAYER, c_cameraPositionTarget, c_cameraDirectionZ, 0.02, 2.0, 100.0, 3.0)
// L5422
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionXY, 0.5, 1.0, 100.0, 0.0)
// L5424
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionXY, 0.25, 0.5, 100.0, 0.0)
// L5426
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionXY, 0.125, 0.25, 100.0, 0.0)
// L3619
CameraShakeStart(1, c_cameraPositionTarget, c_cameraDirectionZ, 0.02, 2.0, 100.0, 3.0)
// L5380
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 2.0, 100.0, 1.0)
// L1910
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L1947
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L2100
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L2140
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L2180
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L2221
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L4542
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L5932
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L6063
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L6084
CameraShakeStart(gv_p01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.5, 1.0, 100.0, 1.0)
// L1804
CameraShakeStart(gv_p1_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.02, 2.0, 100.0, 2.0)
// L2514
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3064
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)
// L3072
CameraShakeStart(gv_pLAYER01_USER, c_cameraPositionTarget, c_cameraDirectionZ, 0.07, 2.0, 100.0, 3.0)