switch between macros

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

switch between macros

Postby adolf_hitler » Sun Sep 19, 2021 3:47 am

Is it possible to switch to another macro while a macro is running? In the fighting game, I'm doing a Mortal Kombat 11 macro and it's very long, consecutive moves but the opponent didn't eat it, is it possible for me to cancel immediately and do another macro move?
User avatar
adolf_hitler
Private First Class
Private First Class
 
Posts: 2
Joined: Fri Jan 08, 2021 1:45 am

Re: switch between macros

Postby Mad » Sun Sep 19, 2021 5:05 am

Yes, call macro_stop() first then macro_run

https://www.consoletuner.com/wiki/index ... _functions
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: switch between macros

Postby adolf_hitler » Wed Sep 29, 2021 10:30 pm

well, let's say we're holding down a key. but we should not press that key while doing the macro. Is there a command to cancel that key? actually it can be solved by not pressing that key, but the human brain forgets it or I don't want to set it. Is there any key cancel command?
User avatar
adolf_hitler
Private First Class
Private First Class
 
Posts: 2
Joined: Fri Jan 08, 2021 1:45 am

Re: switch between macros

Postby Haures » Thu Sep 30, 2021 12:35 am

adolf_hitler wrote:well, let's say we're holding down a key. but we should not press that key while doing the macro. Is there a command to cancel that key? actually it can be solved by not pressing that key, but the human brain forgets it or I don't want to set it. Is there any key cancel command?


Well that username lol

Anyways i dont know what exactly are you trying to do here but here you have a little example that should work

with two more examples on how to turn off the macro as a comment in the bottom ("//")

Code: Select all
#pragma METAINFO("Macro stop example", 1, 0, "Haures") 
bool macro1=FALSE;
 
main {
    if (get_actual(BUTTON_9) && event_active(BUTTON_4))        //BUTTON_9=LS/L3 + BUTTON_4=RB/R1
        { macro1 = !macro1;                                    //if LS/L3 + RB/R1 are pressed again macro will stop the playback
             if (macro1) { macro_run("example.gmk"); }
        else if (!macro1) { macro_stop(); }
    }                                                         //BUTTON_6=RS/R3
    //if (event_active(BUTTON_6)) { macro_stop(); };          //if BUTTON_6 is pressed the macro will stop the playback
    //if (event_release(BUTTON_4)) { macro_stop(); };         //if BUTTON_4 is released the macro will stop the playback
    }
Haures
Sergeant First Class
Sergeant First Class
 
Posts: 16
Joined: Thu Sep 16, 2021 2:59 pm
Location: Germany


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 135 guests