PDA

View Full Version : I need some help



Alucards10
29th April 16, 05:30
Hello guys, so i've been trying to script some combos for my games but i have some troubles with one. Basically what I want to achieve is to press back then 5 times square in a same interval. So it would look like something like that: back,square,square,square,square or (back square),square,square,square,squarethis is the code i have for the moment, but when i press the button nothing happensGPC:combo JF{ set_val(PS3_LEFT,100); set_val(PS3_SQUARE,100); wait(10) set_val(PS3_SQUARE,100); wait(10) set_val(PS3_SQUARE,100); wait(10) set_val(PS3_SQUARE,100); wait(10) set_val(PS3_SQUARE,100); }Thanks in advance

LEX LOST
29th April 16, 06:07
2 questions:
- with which button you want to start that combo;
- for BACK do you mean dpad down? if yes, why did you write: set_val(PS3_LEFT,100); ???

Alucards10
29th April 16, 06:35
Oh with back i mean left on your dpad sorry, i want to start the combo with R2

Alucards10
29th April 16, 06:36
Thanks for your quick response btw ;)

lumbo1
29th April 16, 06:57
Hopefully this helps!

// This sets the amount of time the button is held down for
define TimeButtonIsHeld = 20;

// This sets the time between each of your button presses (i.e. 500 ms / 0.5 seconds)
define TimeBetweenButtonPresses = 500;

int runCombo = FALSE;

main
{
if(get_val(4))
combo_run(Alucard_Combo);


}


combo Alucard_Combo {

// Back:

set_val(15, 100);
wait(TimeButtonIsHeld);

set_val(15, 0);
wait(TimeBetweenButtonPresses);



// Square 1:

set_val(20, 100);
wait(TimeButtonIsHeld);

set_val(20, 0);
wait(TimeBetweenButtonPresses);



// Square 2:

set_val(20, 100);
wait(TimeButtonIsHeld);

set_val(20, 0);
wait(TimeBetweenButtonPresses);



// Square 3:

set_val(20, 100);
wait(TimeButtonIsHeld);

set_val(20, 0);
wait(TimeBetweenButtonPresses);



// Square 4:

set_val(20, 100);
wait(TimeButtonIsHeld);

set_val(20, 0);
wait(TimeBetweenButtonPresses);



// Square 5:

set_val(20, 100);
wait(TimeButtonIsHeld);

set_val(20, 0);
wait(TimeBetweenButtonPresses);

}

LEX LOST
29th April 16, 06:57
Oh with back i mean left on your dpad sorry, i want to start the combo with R2

this combo runs once.
if you want it to run in loop, just write get_val instead of event_press:



define time = 100; // increase to slower or decrease for a faster combo

main {

if(event_press(PS4_R2)) {
combo_run(JF);

}

}
combo JF{
set_val(PS3_LEFT, 100);
wait(100)
wait(time)
set_val(PS3_SQUARE,100);
wait(100)
wait(time)
set_val(PS3_SQUARE,100);
wait(100)
wait(time)
set_val(PS3_SQUARE,100);
wait(100)
wait(time)
set_val(PS3_SQUARE,100);
wait(100)
wait(time)
set_val(PS3_SQUARE,100);
wait(100)
wait(time)
}

Alucards10
29th April 16, 07:46
Thanks alot guys, im going to try those scripts when im back home. Btw what Is the difference between event_press and get _value? Because I have another combo who is working fine but sometimes it doesn't execute the last command of the combo in both cases. Can anyone explain it to me please?

LEX LOST
29th April 16, 08:31
Thanks alot guys, im going to try those scripts when im back home. Btw what Is the difference between event_press and get _value? Because I have another combo who is working fine but sometimes it doesn't execute the last command of the combo in both cases. Can anyone explain it to me please?


as i told you above, with event_press the combo will run once after tapping the start button, regardless of the duration or intensity of the tap.
Instead with get_val, if you keep hold the start button, the combo will run in loop until you realese it

Alucards10
29th April 16, 08:35
Thank you very for the responses, your input is very appreciated since im still learning ��

Alucards10
29th April 16, 15:07
Thanks again guys, both combos are working :)