Global Command: createHapticEffectCondition

From The Official Visionaire Studio: Adventure Game Engine Wiki

Create a haptic effect for devices which support haptic effects.

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


Syntax

createHapticEffectCondition(effectType, length, delay, right_sat, left_sat, right_coeff, left_coeff, deadband, center)


Parameters

Parameter Type Description
effectType string Type of the effect.
length int Duration of the effect in milliseconds.
delay int
right_sat int
left_sat int
right_coeff int
left_coeff int
deadband int
center int


Return values

Type Description
integer The unique id of the created effect.


Examples

Example 1: Create and start a haptic effect.

local effectID = createHapticEffectCondition('spring', 5000, -1, 0xFFFF, 0xFFFF, 0x2000, 0x2000, -1, 0x1000)
startHapticEffect(effectID)