Difference between revisions of "Global Command: createHapticEffectLeftRight"
From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "Create a haptic left/right effect for devices which support haptic effects. {| class="ts" |- | style="width:15%" | Related functions | Global Command: createHapticEffectCon...") |
(No difference)
|
Revision as of 11:10, 5 August 2023
Create a haptic left/right effect for devices which support haptic effects.
Syntax
createHapticEffectLeftRight(effectType, length, large_magnitude, small_magnitude)
Parameters
| Parameter | Type | Description |
|---|---|---|
| effectType | string | Type of the effect. Supported values:
|
| length | int | Duration of the effect in milliseconds |
| large_magnitude | int | Control of the large controller motor |
| small_magnitude | int | Control of the small controller motor |
Return values
| Type | Description |
|---|---|
| integer | The unique id of the effect or -1 if the effect is not supported by the controller. |
Examples
Example 1: Create a constant haptic effect and start it.
local effectID = createHapticEffectLeftRight('leftright', 5000, 0x3000, 0xFFFF)
startHapticEffect(effectID)