system.playHaptic¶
since 1.1.0
Play haptic vibration.
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
duration |
string | yes | in ms (number) or pattern |
strength |
number | optional (default 0) |
% of the max strength, 0 stands for the strength entered in System |
Returns¶
Nothing.
Examples¶
From the official Ethos documentation
system.playHaptic(200) -- Bzz during 200ms
system.playHaptic("- . -") -- Bzzz Bz Bzzz
Used in¶
Real-world usage¶
Called 4 times across 2 open-source Ethos Lua projects. A few short excerpts: