Site Tools
Sidebar
User's Manual
t2:ffb_set
ffb_set
ffb_set — Set FFB speed and duration
Description
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 . |
Parameters
- <FFB_IDENTIFIER>: An valid FFB identifier
FFB_1
,FFB_2
,FFB_3
orFFB_4
. Note: the FFB identifier is passed as direct parameter of theffb_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.
Examples
Example #1 ffb_set() example
main { if(event_active(BUTTON_16)) { ffb_set(FFB_1, 100.0, 500); } }
See Also
t2/ffb_set.txt · Last modified: 2016/11/29 10:54 by J2Kbr