Need some color change help :)

Gtuner IV general support. Operation, questions, updates, feature request.

Need some color change help :)

Postby Maxxgold » Mon May 17, 2021 12:09 am

Ok, each script now changes color. The Right DPad changes to Red, and the L3+X changes to green.
When both are enabled they change to Yellow.
But, if I turn one off, the color changes to blue, and then the script still running doesn’t change colors when I turn it off. I’m guessing because blue is the default color, so it can’t change.

Getting closer though.

I just want acknowledgment from the Led that each script has turned on, and each script has turned off. Right now it shows each one turning on, and it shows when both are turned on, and it shows when one is turned off. I just need a way to show when both are turned off.

Code: Select all
#pragma METAINFO("Path of Exile 2", 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;
main {
    if(event_active(PS5_RIGHT)) {
        toggle = !toggle;
        if(toggle) combo_run(Rumble1);
        else combo_run(Rumble2);
        if(toggle) combo_run (Led2);
        else led_reset();
    }
    if(is_active(PS5_L3) && event_active(PS5_CROSS)) {
        loot = !loot;
        if(loot) combo_run(Rumble1);
        else combo_run(Rumble2);
        if(loot) combo_run (Led1);
        else led_reset();
    }
 
    if(toggle) combo_run(myCombo);
    if(loot) combo_run(autoloot);
}
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_LEFT, 100);
    wait(100);
    set_val(PS5_UP, 4000);
    wait(100);
    set_val(PS5_RIGHT, 100);
    wait(100);
}
 
combo Rumble1 {
    ffb_set(FFB_1, 100f, 250);
    wait(0);
    wait(500);
    ffb_reset();
}
 
combo Rumble2 {
    call(Rumble1);
    call(Rumble1);
}
 
combo Led2 {
    set_led(RED, 100);
}
 
combo Led1 {
    set_led(GREEN, 100);
}
Last edited by Maxxgold on Mon May 17, 2021 12:28 am, edited 2 times in total.
User avatar
Maxxgold
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 265
Joined: Mon Aug 01, 2016 8:43 pm

Re: Need some color change help :)

Postby Mad » Mon May 17, 2021 12:45 am

Code: Select all
#pragma METAINFO("Path of Exile 2", 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;
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(toggle) combo_run(myCombo);
    if(loot) combo_run(autoloot);
}
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_LEFT, 100);
    wait(100);
    set_val(PS5_UP, 4000);
    wait(100);
    set_val(PS5_RIGHT, 100);
    wait(100);
}
 
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
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Need some color change help :)

Postby Maxxgold » Mon May 17, 2021 12:47 am

So, not sure if this is possible, but I need each script to see if the other script is running, and if the other script is running, I need the script that is turning off to switch to the color of the running script. Way beyond my basic knowledge.
User avatar
Maxxgold
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 265
Joined: Mon Aug 01, 2016 8:43 pm

Re: Need some color change help :)

Postby Maxxgold » Mon May 17, 2021 12:48 am

Thanks Mad, let me check that out. I was posting at the same time.
User avatar
Maxxgold
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 265
Joined: Mon Aug 01, 2016 8:43 pm

Re: Need some color change help :)

Postby Maxxgold » Mon May 17, 2021 12:57 am

Mad wrote:
Code: Select all
#pragma METAINFO("Path of Exile 2", 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;
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(toggle) combo_run(myCombo);
    if(loot) combo_run(autoloot);
}
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_LEFT, 100);
    wait(100);
    set_val(PS5_UP, 4000);
    wait(100);
    set_val(PS5_RIGHT, 100);
    wait(100);
}
 
combo Rumble1 {
    ffb_set(FFB_1, 100f, 250);
    wait(0);
    wait(500);
    ffb_reset();
}
 
combo Rumble2 {
    call(Rumble1);
    call(Rumble1);
}


Thank you, it’s perfect :smile0517: :smile0202:
User avatar
Maxxgold
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 265
Joined: Mon Aug 01, 2016 8:43 pm

Re: Need some color change help :)

Postby Mad » Mon May 17, 2021 1:13 am

:joia: :joia:
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 45 guests