Auto Run 360 Stick Movement.
19 posts
• Page 1 of 2 • 1, 2
Auto Run 360 Stick Movement.
This script works great, but it just activates in one direction. I did add the X axis to get up and left to activate sprint, but I need it to activate when the stick is moved in any direction. Is there a simple way to get 360 degrees activation on the stick?
- Code: Select all
main {
if(get_actual(STICK_2_Y) <= -90f) {
if(get_prev(STICK_2_Y) >= -90f) {
combo_run(Sprint);
}
}
}
combo Sprint {
set_val(BUTTON_17, 100);
wait(50); wait(50);
}
-
Maxxgold - Sergeant Major of the Army
- Posts: 265
- Joined: Mon Aug 01, 2016 8:43 pm
Re: Auto Run 360 Stick Movement.
- Code: Select all
main {
if(is_active(STICK_2_X) || is_active(STICK_2_Y)) {
combo_run(Sprint);
}
}
combo Sprint {
set_val(BUTTON_17, 100);
wait(50); wait(50);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Auto Run 360 Stick Movement.
Hey Mad, thank you for all the help. This works great for my flask, but I need something that is 360 degrees on the stick, but right at the edge of the stick movement. It is for a dash move, and I don’t want it executing unless I’m at the edge of the stick movement. Any help would be appreciated:)
-
Maxxgold - Sergeant Major of the Army
- Posts: 265
- Joined: Mon Aug 01, 2016 8:43 pm
Re: Auto Run 360 Stick Movement.
- Code: Select all
main {
if(sqrt(sq(get_actual(STICK_2_X)) + sq(get_actual(STICK_2_Y))) >= 90f) {
combo_run(Sprint);
}
}
combo Sprint {
set_val(BUTTON_17, 100);
wait(50); wait(50);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Auto Run 360 Stick Movement.
This works great Mad. I'm trying not to keep you busy, so I'm trying to put this in a toggle, but I don't know how to deal with the if statement in the combo area. I'm guessing, you can't put the if statement in the combo area. Can you fix it, or give me an idea.
I've added the bool "sprint", and when sprint is true, I have it set to combo_run(autoSprint). I have it set to enable on L3 and Square.
I've added the bool "sprint", and when sprint is true, I have it set to combo_run(autoSprint). I have it set to enable on L3 and Square.
- Code: Select all
#pragma METAINFO("POE Work in Progress", 1, 0, "Maxxgold")
#ifndef set_led // IMPORTANT: Don't delete this line.
#define set_led(LED_INDENTIFER, INTENSITY) led_set(LED_INDENTIFER, (fix32) INTENSITY, NULL);
#define RED LED_2
#define GREEN LED_3
#define BLUE LED_1
#endif // IMPORTANT: Don't delete this line.
#include <ps5.gph>
bool toggle;
bool loot;
bool sprint;
main {
if(event_active(PS5_RIGHT)) {
toggle = !toggle;
if(toggle) {
combo_run(Rumble1);
set_led(RED, 100);
}
else {
combo_run(Rumble2);
led_reset();
if(loot) set_led(GREEN, 100);
}
}
if(is_active(PS5_L3) && event_active(PS5_CROSS)) {
loot = !loot;
if(loot) {
combo_run(Rumble1);
set_led(GREEN, 100);
}
else {
combo_run(Rumble2);
led_reset();
if(toggle) set_led(RED, 100);
}
}
if(is_active(PS5_L3) && event_active(PS5_SQUARE)) {
sprint = !sprint;
if(sprint) {
combo_run(Rumble1);
}
else {
combo_run(Rumble2);
}
}
if(toggle) combo_run(myCombo);
if(loot) combo_run(autoloot);
if(sprint) combo_run(autoSprint);
}
combo autoloot {
set_val(PS5_CROSS, 100);
wait(100);
set_val(PS5_CROSS, 0);
wait(100);
}
combo myCombo {
set_val(PS5_L1, 100);
wait(100);
set_val(PS5_R1, 100);
wait(100);
set_val(PS5_RIGHT, 100);
wait(100);
set_val(PS5_UP, 4000);
wait(100);
set_val(PS5_LEFT, 100);
wait(100);
}
combo autoSprint {
set_val(BUTTON_17, 100);
wait(50); wait(50);
}
combo Rumble1 {
ffb_set(FFB_1, 100f, 250);
wait(0);
wait(500);
ffb_reset();
}
combo Rumble2 {
call(Rumble1);
call(Rumble1);
}
-
Maxxgold - Sergeant Major of the Army
- Posts: 265
- Joined: Mon Aug 01, 2016 8:43 pm
Re: Auto Run 360 Stick Movement.
- Code: Select all
#pragma METAINFO("POE Work in Progress", 1, 0, "Maxxgold")
#ifndef set_led // IMPORTANT: Don't delete this line.
#define set_led(LED_INDENTIFER, INTENSITY) led_set(LED_INDENTIFER, (fix32) INTENSITY, NULL);
#define RED LED_2
#define GREEN LED_3
#define BLUE LED_1
#endif // IMPORTANT: Don't delete this line.
#include <ps5.gph>
bool toggle;
bool loot;
bool sprint;
main {
if(event_active(PS5_RIGHT)) {
toggle = !toggle;
if(toggle) {
combo_run(Rumble1);
set_led(RED, 100);
}
else {
combo_run(Rumble2);
led_reset();
if(loot) set_led(GREEN, 100);
}
}
if(is_active(PS5_L3)) {
if(event_active(PS5_CROSS)) {
loot = !loot;
if(loot) {
combo_run(Rumble1);
set_led(GREEN, 100);
}
else {
combo_run(Rumble2);
led_reset();
if(toggle) set_led(RED, 100);
}
}
if(event_active(PS5_SQUARE)) {
sprint = !sprint;
if(sprint) {
combo_run(Rumble1);
}
else {
combo_run(Rumble2);
}
}
}
if(toggle) combo_run(myCombo);
if(loot) combo_run(autoloot);
if(sqrt(sq(get_actual(STICK_2_X)) + sq(get_actual(STICK_2_Y))) >= 90f) {
if(sprint) combo_run(autoSprint);
}
}
combo autoloot {
set_val(PS5_CROSS, 100);
wait(100);
set_val(PS5_CROSS, 0);
wait(100);
}
combo myCombo {
set_val(PS5_L1, 100);
wait(100);
set_val(PS5_R1, 100);
wait(100);
set_val(PS5_RIGHT, 100);
wait(100);
set_val(PS5_UP, 4000);
wait(100);
set_val(PS5_LEFT, 100);
wait(100);
}
combo autoSprint {
set_val(BUTTON_17, 100);
wait(50); wait(50);
}
combo Rumble1 {
ffb_set(FFB_1, 100f, 250);
wait(0);
wait(500);
ffb_reset();
}
combo Rumble2 {
call(Rumble1);
call(Rumble1);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Auto Run 360 Stick Movement.
Thank you Mad.
-
Maxxgold - Sergeant Major of the Army
- Posts: 265
- Joined: Mon Aug 01, 2016 8:43 pm
Re: Auto Run 360 Stick Movement.
Will this work with xbox? Never been able to find a smooth script i can add to mine. I just want to able to run fast in any direction ti make my movements smooth, thanks
-
Beryl - Sergeant Major of the Army
- Posts: 198
- Joined: Fri Nov 27, 2020 7:47 pm
Re: Auto Run 360 Stick Movement.
Beryl wrote:Will this work with xbox? Never been able to find a smooth script i can add to mine. I just want to able to run fast in any direction ti make my movements smooth, thanks
Yes it will.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Auto Run 360 Stick Movement.
Mad wrote:Beryl wrote:Will this work with xbox? Never been able to find a smooth script i can add to mine. I just want to able to run fast in any direction ti make my movements smooth, thanks
Yes it will.
Cheers will try add to my pubg script
-
Beryl - Sergeant Major of the Army
- Posts: 198
- Joined: Fri Nov 27, 2020 7:47 pm
19 posts
• Page 1 of 2 • 1, 2
Return to GPC2 Script Programming
Who is online
Users browsing this forum: midg3t2 and 83 guests