PDA

View Full Version : Need Help! For honor dodge and right stick sensitivity



tamtamnhu27
17th March 18, 15:06
I need gpc script only for dodge and right stick sensitivity (For Honor)

thanks for ur help

Excalibur
18th March 18, 06:57
I need gpc script only for dodge and right stick sensitivity (For Honor)

thanks for ur help

Here you go :

By default easy dodge is OFF : in guard - hold directional UP and then press buttons Y, B, A, X (XB1) or Triangle, Circle, Cross, Square (PS4) to enable/disable easy dodge in 4 directions.




define DODGE_BTN = XB1_A;
define LIGHT_ATT = XB1_RB;
define HEAVY_ATT = XB1_RT;
define GUARD_BR = XB1_X;




define right = 1;
define left = 2;
define up = 3;


int grd;
int ra_sens = 275;
//int easy_dodge[4];
int rumble_type ;

// Store toggle states
int ToggleFlags;


init {


ToggleFlags = get_pvar(SPVAR_14, -32768, 32767, 0);


}


main {


set_val(TRACE_1,grd);
///////////////////////////////
// guard direction
if(event_press(XB1_LT)){
grd = 2;
}
if(get_val(XB1_LT)){

///////////////////////////////
// LA dodge
if(get_val(XB1_UP)){
menu_dodge();
}
// easy dodge UP
if(test_bit (ToggleFlags, 1)){
if (get_val(XB1_LY) <= -70 ){
combo_run(DODGE);
}
}

// easy dodge RIGHT
if(test_bit (ToggleFlags, 2)){
if (get_val(XB1_LX) >= 70 ){
combo_run(DODGE);
}
}

// easy dodge DOWN
if(test_bit (ToggleFlags, 3)){
if (get_val(XB1_LY) >= 70 ){
combo_run(DODGE);
}
}

// easy dodge LEFT
if(test_bit (ToggleFlags, 4)){
if (get_val(XB1_LX) <= -70 ){
combo_run(DODGE);
}
}
//////////////////////////////////////////
if(get_val(XB1_RX) >= 40){
grd = right;
}

if(get_val(XB1_RX) <= -40){
grd = left;
}

if(get_val(XB1_RY) <= -40){
grd = up;
}
analog_sens (XB1_RX);
analog_sens (XB1_RY);
}



///////////////////////////////


}
//------------------------------------------------------------------------------
// SET TOGGLES

function SetToggle(FlagLocation)
// Sets toggle states and notifies status via controller rumble
{
if(test_bit(ToggleFlags, FlagLocation)) {
clear_bit(ToggleFlags, FlagLocation);

RumbleAIfTrue(0);

}
else {
set_bit(ToggleFlags, FlagLocation);

RumbleAIfTrue(1);

}
set_pvar(SPVAR_14,ToggleFlags);
}
function menu_dodge(){
if(event_press(XB1_Y)){
SetToggle(1);

}
if(event_press(XB1_B)){
SetToggle(2);
}
if(event_press(XB1_A)){
SetToggle(3);
}
if(event_press(XB1_X)){
SetToggle(4);
}
}
function RumbleAIfTrue(var) {
if (var) {
rumble_type = RUMBLE_A;
}
else {
rumble_type = RUMBLE_B;
}
combo_run(NOTIFY);
}
combo NOTIFY {
set_rumble(rumble_type, 100);
wait(375);
reset_rumble();
}


combo DODGE {
set_val(DODGE_BTN,100);
wait(100);
wait(400);
}


function analog_sens (RA) {
sensitivity(RA,NOT_USE,ra_sens);
}