Fallout 76 Xbox Auto Craft

GPC2 script programming for Titan Two. Code examples, questions, requests.

Fallout 76 Xbox Auto Craft

Postby Comatose » Mon Feb 20, 2023 4:28 am

Code: Select all
bool toggle;
 
main {
    if(event_active(BUTTON_2)) toggle = !toggle;
 
    if(toggle) combo_run(example)
}
combo example {
    set_val(BUTTON_16, 100);
    wait(40);
    set_val(BUTTON_16, 0);
    wait(40);
    set_val(BUTTON_4, 100);
    wait(40);
    set_val(BUTTON_4, 0);
    wait(40);
    set_val(BUTTON_16,100);
    wait(40);
    set_val(BUTTON_16,0);
    wait(40);
    set_val(BUTTON_16,100);
    wait(40);
    set_val(BUTTON_16,0);
    wait(40);
}

It's my first time trying to create a gpc script and I'm not sure what the issue is with it. I'm trying to make a toggleable sequence that repeats the buttons A,RB, A, and A on and xbox controller that is activated with the Xbox View Button but am not sure what I'm doing wrong. Also, the script is indented but when copy and pasting it here, it doesn't look like it. When I try to compile it, I only get 1 error. If someone can assist me, I'd be ever so grateful.
User avatar
Comatose
Private First Class
Private First Class
 
Posts: 2
Joined: Sun Feb 19, 2023 11:13 am

Re: Fallout 76 Xbox Auto Craft

Postby Mad » Mon Feb 20, 2023 6:36 am

Missing a semi colon at the end of combo_run()

Should be:
Code: Select all
if(toggle) combo_run(example);
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Fallout 76 Xbox Auto Craft

Postby Comatose » Mon Feb 20, 2023 7:18 am

Thank you very much. I missed that. Also had to remove the “()” from “combo example”. It works like a charm now.
User avatar
Comatose
Private First Class
Private First Class
 
Posts: 2
Joined: Sun Feb 19, 2023 11:13 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 164 guests