PlayRumble

Category: Player
Since engine version: 8.0 OC

Description

Plays a haptic effect on the given player's gamepad. Returns true if all parameters are valid; there is no way to know whether the rumble was actually played.

Syntax

bool PlayRumble(int player, int strength, int length);

Parameters

player:
Number of the player whose controller should rumble. Can be NO_OWNER to make all controllers rumble.
strength:
Strength of the rumble, between 0 and 1000.
length:
Duration of the rumble in milliseconds.

Example

ShakeObjects(LandscapeWidth()/2, LandscapeHeight()/2, Distance(LandscapeWidth(), LandscapeHeight())/2);
PlayRumble(NO_OWNER, 1000, 2000);
Earthquake: Shakes all Clonks and rumbles all controllers at full strength for two seconds.
See also: StopRumble
Luchs, 2016-02