Programming Question (Vibration)
4 posts
• Page 1 of 1
Programming Question (Vibration)
Hey guys,
just wondering if it's possible to run a script where T2 lets go of a button the second my joystick vibrates? For example, I hold down the A button and the second it vibrates, the script would release the button? or anything that would be close/similar to this?
thanks in advance
just wondering if it's possible to run a script where T2 lets go of a button the second my joystick vibrates? For example, I hold down the A button and the second it vibrates, the script would release the button? or anything that would be close/similar to this?
thanks in advance
-
riribibi - Command Sergeant Major
- Posts: 134
- Joined: Fri Oct 31, 2014 12:33 pm
Re: Programming Question (Vibration)
- Code: Select all
bool release_button;
main{
if(is_active(BUTTON_16)) {
if(ffb_get_actual(FFB_1, 0) || ffb_get_actual(FFB_2, 0) || ffb_get_actual(FFB_3, 0) || ffb_get_actual(FFB_4, 0)) {
release_button = TRUE;
}
if(release_button){
set_val(BUTTON_16, 0);
}
} else release_button = FALSE;
}
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
Re: Programming Question (Vibration)
thank you for the response. just tried this out and it works but a little later than i had anticipated.
was wondering if there is any way to speed up the reaction time? (like instantaneously letting go of the button upon any hint of vibration) appreciate the help in advance
was wondering if there is any way to speed up the reaction time? (like instantaneously letting go of the button upon any hint of vibration) appreciate the help in advance
-
riribibi - Command Sergeant Major
- Posts: 134
- Joined: Fri Oct 31, 2014 12:33 pm
Re: Programming Question (Vibration)
riribibi wrote:was wondering if there is any way to speed up the reaction time? (like instantaneously letting go of the button upon any hint of vibration)
The script is doing exactly this already.
As soon as the FFB motors are assigned a value The A button gets set to 0. released
Not sure why its delayed for you. There must be another factor at play.
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
4 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: EvilGlenn and 193 guests