ffb_set — Set FFB speed and duration


void ffb_set(<FFB_IDENTIFIER>, fix32 speed, uint32 duration);

Set the speed and duration values of the FFB identified by <FFB_IDENTIFIER>.

Once ffb_set() is executed, the force feedback signals from the console will not be transmitted to the connected controllers until ffb_reset() is called.
ATTENTION: The ffb_set() should NOT be called on every interaction of main.
Force Feedback Map for Gamepads
FFB_1 Strong Engine
FFB_2 Weak Engine
FFB_3 Right Trigger 1)
FFB_4 Left Trigger 2)


  • <FFB_IDENTIFIER>: An valid FFB identifier FFB_1, FFB_2, FFB_3 or FFB_4. Note: the FFB identifier is passed as direct parameter of the ffb_set() opcode, therefore stack values can't be used.
  • speed: The FFB speed in percentage, from 0.00 to 100.00 (%).
  • duration: How long, in milli-seconds, the FFB engine should be kept activated.

Return Value

No value is returned.


Example #1 ffb_set() example

main {
    if(event_active(BUTTON_16)) {
        ffb_set(FFB_1, 100.0, 500);

See Also

1) , 2) Impulse triggers of Xbox One controllers
t2/ffb_set.txt · Last modified: 2016/11/29 10:54 by J2Kbr