int prob
33 posts
• Page 2 of 4 • 1, 2, 3, 4
Re: int prob
Ok my code above compiled fine, but it just doesn't work. My stick doesn't move at all! It's like it's frozen completely. When I comment it out, I can move my stick again. Has anyone actually been able to get this working?
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
Re: int prob
I tried this alternative one, and the stick is no longer frozen but it goes a little crazy. Right is left, left is left, down is up!
I've updated to the latest beta firmware btw:
I've updated to the latest beta firmware btw:
- Code: Select all
void sensitivity(uint8 IO_IDENT, fix32 midpoint, fix32 sens)
{
value = get_val(IO_IDENT);
if (value < 0.0)
{
value = abs(value);
signed = TRUE;
}
if (midpoint)
if (value > midpoint)
{
mid = value - midpoint;
rest = 100.0 - midpoint;
value = (50.0 / rest) * mid + 50.0;
} else
value = (50.0 / midpoint) * value;
if (sens)
value = (sens / 100.0) * value;
if (value > 100.0)
value = 100.0;
if (signed)
value = -value; // no inv()
set_val(IO_IDENT, value);
}
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
Re: int prob
Alright. sorry for the late contribution on the 'sensitivity' function, here is it implemented as it is on titan One:
- Code: Select all
#include <ps4.gph>
main {
sensitivity(PS4_RX, 25.0, 120.0);
}
void sensitivity(uint8 i, fix32 m, fix32 s) {
fix32 v = get_val(i);
if(v) {
if(m) {
v = (v > 0.0) ? midpoint(v, m) : midpoint(v * -1.0, m) * -1.0;
}
if(s) {
v = (v * s) / 100.0;
}
if(v > 100.0) v = 100.0;
else if(v < -100.0) v = -100.0;
set_val(i, v);
}
return;
}
fix32 midpoint(fix32 v, fix32 m) {
if(v <= m) return((v * 50.0) / m);
return(((50.0 * (v - m)) / (100.0 - m)) + 50.0);
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: int prob
and how will this work in my example
- Code: Select all
sensitivity( PS4_RX, MIDPOINT+variable, ADS_SENS+variable);
-
yohimbe - Sergeant Major
- Posts: 84
- Joined: Sun Mar 01, 2015 7:27 pm
Re: int prob
please let me know the declaration of
MIDPOINT
ADS_SENS
variable
MIDPOINT
ADS_SENS
variable
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: int prob
yohimbe wrote:and how will this work in my example
- Code: Select all
sensitivity( PS4_RX, MIDPOINT+variable, ADS_SENS+variable);
Did you check out the other posts? We posted scriprs that will compile
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: int prob
UK_Wildcats_Fans wrote:yohimbe wrote:and how will this work in my example
- Code: Select all
sensitivity( PS4_RX, MIDPOINT+variable, ADS_SENS+variable);
Did you check out the other posts? We posted scriprs that will compile
All those scripts compiled but as I mentioned the two I tested didn't work at all. J2Kbr's original function was perfect though!
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
Re: int prob
yeah they compiled but didnt work
so pls
so pls
- Code: Select all
define ADS_SENS = 100;
define OVE_SENS = 100;
define MIDPOINT = 50;
int add_time;
int add_times;
int add_timem;
main {
}
if (get_val(ADS) ) {
sensitivity( 9, MIDPOINT+add_timem, ADS_SENS+add_time);
sensitivity(10, MIDPOINT+add_timem, ADS_SENS+add_time);
}else{
// OVERALL SENS
sensitivity( 9, MIDPOINT+add_timem, OVE_SENS+add_times);
sensitivity(10, MIDPOINT+add_timem, OVE_SENS+add_times);
}
if(get_val(XB1_LT)){
if(event_press(XB1_Y)){add_times = add_times + 5;}
if(event_press(XB1_B)){
add_times = add_times - 5;
} }
if(get_val(XB1_LS)){
if(event_press(XB1_Y)){add_timem = add_timem + 5;}
if(event_press(XB1_B)){
add_timem = add_timem - 5;
} }
if(get_val(XB1_P4)){
if(event_press(XB1_Y)){add_time = add_time + 5;}
if(event_press(XB1_B)){
add_time = add_time - 5;
}
-
yohimbe - Sergeant Major
- Posts: 84
- Joined: Sun Mar 01, 2015 7:27 pm
Re: int prob
call like this:
sensitivity( 9, (fix32)(MIDPOINT+add_timem), (fix32)(ADS_SENS+add_time));
sensitivity( 9, (fix32)(MIDPOINT+add_timem), (fix32)(ADS_SENS+add_time));
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: int prob
i got
with no effect
even with
no difference
- Code: Select all
int ADS_SENS = 100;
int OVE_SENS = 100;
int MIDPOINT = 50;
sensitivity( 9, (fix32)(MIDPOINT+add_timem), (fix32)(ADS_SENS+add_times));
sensitivity( 10, (fix32)(MIDPOINT+add_timem), (fix32)(ADS_SENS+add_times));
}
else{
// OVERALL SENS
sensitivity( 9, (fix32)(MIDPOINT+add_timem), (fix32)(ADS_SENS+add_time));
sensitivity( 10, (fix32)(MIDPOINT+add_timem), (fix32)(ADS_SENS+add_times));
}
if(get_val(BUTTON_8)){
if(event_active(BUTTON_14)){add_times = add_times + 5;}
if(event_active(BUTTON_15)){add_times = add_times - 5;}
}
if(get_val(BUTTON_9)){
if(event_active(BUTTON_14)){add_timem = add_timem + 5;}
if(event_active(BUTTON_15)){add_timem = add_timem - 5;}
}
if(get_val(BUTTON_21)){
if(event_active(BUTTON_14)){add_time = add_time + 5;}
if(event_active(BUTTON_15)){add_time = add_time - 5;}
}
if(get_val(BUTTON_6)) {combo_run(uu); set_val(BUTTON_6, 0.0);}
if(get_val(BUTTON_20)){combo_run(a); set_val(BUTTON_20, 0.0);}
}
with no effect
even with
- Code: Select all
define ADS_SENS = 200;
define OVE_SENS = 200;
define MIDPOINT = 10;
no difference
-
yohimbe - Sergeant Major
- Posts: 84
- Joined: Sun Mar 01, 2015 7:27 pm
33 posts
• Page 2 of 4 • 1, 2, 3, 4
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 82 guests