Strafe request
16 posts
• Page 2 of 2 • 1, 2
Re: Strafe request
Try this wile stop after 3 sec or when you stop ads
Tahsin wrote:And this works when ADS and doble tap L1
- Code: Select all
main
{
///strafe ADS + doble tap L1
if (get_actual(BUTTON_8)){
if ( event_active(BUTTON_7) && time_release(BUTTON_7) <250 ) {
combo_run(AutoStrafe);
}
}else {
combo_stop(AutoStrafe);
}
}
//Auto Strafe
combo AutoStrafe
{
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
}
-
Tahsin - Sergeant Major
- Posts: 100
- Joined: Wed May 15, 2019 7:57 am
Re: Strafe request
Will give it a try now! Cheers
-
Beryl - Sergeant Major of the Army
- Posts: 198
- Joined: Fri Nov 27, 2020 7:47 pm
Re: Strafe request
Tahsin wrote:Try this wile stop after 3 sec or when you stop adsTahsin wrote:And this works when ADS and doble tap L1
- Code: Select all
main
{
///strafe ADS + doble tap L1
if (get_actual(BUTTON_8)){
if ( event_active(BUTTON_7) && time_release(BUTTON_7) <250 ) {
combo_run(AutoStrafe);
}
}else {
combo_stop(AutoStrafe);
}
}
//Auto Strafe
combo AutoStrafe
{
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
}
Appreciate your kind help but it aint working for some reason?
-
Beryl - Sergeant Major of the Army
- Posts: 198
- Joined: Fri Nov 27, 2020 7:47 pm
Re: Strafe request
Beryl wrote:Tahsin wrote:Try this wile stop after 3 sec or when you stop adsTahsin wrote:And this works when ADS and doble tap L1
- Code: Select all
main
{
///strafe ADS + doble tap L1
if (get_actual(BUTTON_8)){
if ( event_active(BUTTON_7) && time_release(BUTTON_7) <250 ) {
combo_run(AutoStrafe);
}
}else {
combo_stop(AutoStrafe);
}
}
//Auto Strafe
combo AutoStrafe
{
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, 100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
set_val(STICK_2_X, -100.0);
wait(600);
set_val(STICK_2_X, 0.0);
wait(60);
}
Appreciate your kind help but it aint working for some reason?
I've tested it and it works without issue maybe you put the code in the wrong place
When you ADS dobble tap L1 to get it work
My ADS is on hold .
-
Tahsin - Sergeant Major
- Posts: 100
- Joined: Wed May 15, 2019 7:57 am
Re: Strafe request
- Code: Select all
#pragma METAINFO("AutoStrafe", 1, 0, "bonefisher")
int strafe_change;
int t;
uint32 strafe_timeout = 3000;// Change timeout time
main {
if(event_active(BUTTON_8)
& !strafe_change || (t > strafe_timeout)){
t = 0,
strafe_change = !strafe_change;
}
if (strafe_change && is_release(STICK_2_X)){
++t;
if (event_active(BUTTON_8)|| (strafe_timeout == 0))
{ t = 0; }
...
combo_run(strafe);
}
if(is_release(BUTTON_8)){
combo_stop(strafe);
}
}
combo strafe
{
set_val(STICK_2_X, 100f);
wait(300);
set_val(STICK_2_X, -100f);
wait(300);
}
Hold ADS trigger to strafe!
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Strafe request
Thanks alot to you both youv been very kind and helpful
-
Beryl - Sergeant Major of the Army
- Posts: 198
- Joined: Fri Nov 27, 2020 7:47 pm
16 posts
• Page 2 of 2 • 1, 2
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 107 guests