Vibrate
Make the player's device vibrate
Last updated
Make the player's device vibrate
Last updated
The vibrate
action allows you to make the player's device vibrate on a given pattern. By vibration we refer to actual vibration, not shaking the screen so this is only supported on mobile devices with such capabilities. If this feature is not supported on the player's device, nothing will happen and the game will continue with it's normal flow.
Action ID: Vibrate
Reversible: Yes
Requires User Interaction: No
You can make the device vibrate only once, for example, the following will make it vibrate for 200ms and then stop.
You can also make the device vibrate following a pattern by providing a list of times, the following will make the device vibrate for 200ms, then 100ms, then 150ms and so on.
Name
Type
Optional
Description
pattern
numbers
No
List of space separated times in milliseconds. While there's no limit on how large a pattern can be, at least one time is required.