Global Command: createHapticEffectLeftRight

From The Official Visionaire Studio: Adventure Game Engine Wiki

Create a haptic left/right effect for devices which support haptic effects.

Related functions createHapticEffectCondition | createHapticEffectConstant | createHapticEffectPeriodic | createHapticEffectRamp | startHapticEffect | startHapticRumble | stopHapticEffect | stopHapticRumble


Syntax

createHapticEffectLeftRight(effectType, length, large_magnitude, small_magnitude)


Parameters

Parameter Type Description
effectType string Type of the effect. Supported values:
  • leftright
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 haptic left/right effect and start it.

local effectID = createHapticEffectLeftRight('leftright', 5000, 0x3000, 0xFFFF)
startHapticEffect(effectID)