Need script to move side to side
32 posts
• Page 1 of 4 • 1, 2, 3, 4
Need script to move side to side
Can someone help me with a script basically I am looking for something where when i press L2 scope in and i should be able to move left and right to avoid getting shot and then when i fire r2 crouch get up move side to sode
-
sofiereg - Sergeant
- Posts: 6
- Joined: Sat Jun 09, 2018 3:59 pm
Re: Need script to move side to side
this should do, please note I assumed the button to crouch is CIRCLE (BUTTON_15). See the comments on the code.
- Code: Select all
main {
// when i press L2 scope in and i should be able to move left and right
// to avoid getting shot
if(get_val(BUTTON_8)) {
combo_run(LeftRight);
}
// and then when i fire r2 crouch get up move side to sode
if(get_val(BUTTON_5)) {
if(event_active(BUTTON_5) || event_release(BUTTON_5)) {
combo_run(Crouch);
}
combo_stop(LeftRight);
}
}
combo Crouch {
set_val(BUTTON_15, 100.0);
wait(50);
}
combo LeftRight {
set_val(STICK_2_X, -100.0);
wait(200);
set_val(STICK_2_X, 100.0);
wait(200);
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Need script to move side to side
Thank you sir. U r awesome. Is there a way you can create a script for headshots. basically i play sniper elite 4 headhunter
these guys i dont know what they have they just run stop and shoot and it hits headshot
l2 is scope r2 is fire i want something where i can get headshots easily
these guys i dont know what they have they just run stop and shoot and it hits headshot
l2 is scope r2 is fire i want something where i can get headshots easily
-
sofiereg - Sergeant
- Posts: 6
- Joined: Sat Jun 09, 2018 3:59 pm
Re: Need script to move side to side
What’s the difference between stick 1 and stick 2?
-
teckx - Sergeant Major of the Army
- Posts: 194
- Joined: Tue Mar 27, 2018 1:53 pm
Re: Need script to move side to side
teckx wrote:What’s the difference between stick 1 and stick 2?
1 is the right stick (usually for aiming), 2 is for the left stick (move).
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Need script to move side to side
When I try to make the mouse move by doing somthing like this. It never works. Any idea why I cannot get the mouse to move with a combo ?
combo LeftRight {
Mouse_set(STICK_1_X, -100.0);
wait(200);
Mouse_set(STICK_1_X, 100.0);
wait(200);
}
combo LeftRight {
Mouse_set(STICK_1_X, -100.0);
wait(200);
Mouse_set(STICK_1_X, 100.0);
wait(200);
}
-
teckx - Sergeant Major of the Army
- Posts: 194
- Joined: Tue Mar 27, 2018 1:53 pm
Re: Need script to move side to side
https://www.consoletuner.com/wiki/index ... :mouse_set
https://www.consoletuner.com/wiki/index ... :mouse_gph
I never used the commands to control the mouse, but I am sure that you can't use it with "STICK_1_X".
The links above may help you.
https://www.consoletuner.com/wiki/index ... :mouse_gph
I never used the commands to control the mouse, but I am sure that you can't use it with "STICK_1_X".
The links above may help you.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Need script to move side to side
teckx wrote:When I try to make the mouse move by doing somthing like this. It never works. Any idea why I cannot get the mouse to move with a combo ?
Use MOUSE_X not STICK_1_X.
like so
- Code: Select all
#include <mouse.gph>
combo LeftRight {
Mouse_set(MOUSE_X, -100.0);
wait(200);
Mouse_set(MOUSE_X, 100.0);
wait(200);
}
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Need script to move side to side
thank you.. it works!
-
teckx - Sergeant Major of the Army
- Posts: 194
- Joined: Tue Mar 27, 2018 1:53 pm
Re: Need script to move side to side
Can some one make a script or game pack for sniper elite. Looking for anti recoil, fast shot,autotag,aim assist. Hold breath or a script where I can get headshots
-
sofiereg - Sergeant
- Posts: 6
- Joined: Sat Jun 09, 2018 3:59 pm
32 posts
• Page 1 of 4 • 1, 2, 3, 4
Return to GPC2 Script Programming
Who is online
Users browsing this forum: fox5 and 81 guests