Need help with FFB

GPC2 script programming for Titan Two. Code examples, questions, requests.

Need help with FFB

Postby legitclouds » Tue Sep 03, 2019 6:42 pm

Is there a way to output via output panel there time between ffb rumbles? When monitoring device manager I can see the ffb blinking at different speeds depending on weapon. Im looking to get the time between rumbles, and if possible how long each rumble is. Ive been working on FFB based anti recoil and need the above data to tweak everything to where I want it to be. Now it is either a bit to weak or strong depending on the weapon. I noticed the speed of the ffb is different per weapon and could have my script make adjustments based off of that. Standard ARs are perfect now with anti recoil but I am looking to make it perfect for all weapons. Any help would be greatly appreciated
User avatar
legitclouds
Sergeant
Sergeant
 
Posts: 9
Joined: Wed Nov 14, 2018 9:30 pm

Re: Need help with FFB

Postby Scachi » Tue Sep 03, 2019 7:00 pm

the function ffb_get should help you. https://www.consoletuner.com/wiki/index ... t2:ffb_get
use it and printf the value and duration when it is different than the last one read as an example.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Need help with FFB

Postby bonefisher » Tue Sep 03, 2019 8:33 pm

Code: Select all
 
#define ffb1 ffb_get_actual(FFB_1, 0)
#define ffb2 ffb_get_actual(FFB_2, 0)
 
main {
  if(is_active(4)) {
    if (ffb1) printf("FFB1: %f", ffb1);
    if (ffb2) printf("FFB2: %f", ffb2);
  }
}
 

It will show in out panel on release of fire trigger!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 67 guests