Need help using a recorded macro
Posted:
Sun Jul 14, 2019 12:29 am
by Airforce
Hello
I'm in need of guidance as I'm still learning GPC..
So, I've recorded the macros under device monitor and went to the editor and now I wish to use them.
In GPC, I'm wanting to toggle between the 10 macros using a numberpad that I have plugged into the Titan2 (antirecoil). How might this be done?
Re: Need help using a recorded macro
Posted:
Sun Jul 14, 2019 4:33 am
by Airforce
I'm having a difficult time just getting it to play lol.
I was able to record what I needed, edit it, and save it as a gmk file onto the SD card.
I wasted 8 hours today and don't feel any closer in getting this done :\.
Essentially, its an anti-recoil macro,... So when button 5 is pressed, run the macro on the sd card.. when it's released, stop.. any ideas?
Re: Need help using a recorded macro
Posted:
Sun Jul 14, 2019 5:02 am
by Mad
- Code: Select all
main {
if (get_actual(BUTTON_5)) macro_run("Example.gmk");
else macro_stop();
}
But why the macro? There are some solid choices in the online resource section for anti-recoil
Re: Need help using a recorded macro
Posted:
Sun Jul 14, 2019 5:08 am
by Airforce
I've been making weapon-specific anti-recoil macros,.. I was able to record them using the titan 2 and now I'm trying to use them + switch between them using a numberpad connected to the T2.
Re: Need help using a recorded macro
Posted:
Sun Jul 14, 2019 5:49 am
by Buffy
Something like this (macros must be named 0.gmk, 1.gmk, 2.gmk ... 9.gmk)?
- Code: Select all
#include <keyboard.gph>
#include <xb1.gph>
uint8 key_idx;
char* str = "n.gmk";
main {
if(is_active(XB1_LT) && is_active(XB1_RT)) {
if(sqrt(sq(get_actual(XB1_RX)) + sq(get_actual(XB1_RY))) < 30.0) {
macro_run(str);
}
}
else if(macro_time() > 0) macro_stop();
}
// macro selector
main {
if(key_status((KEY_PAD1 + key_idx))) {
*str = (key_idx == 9) ? '0' : '1' + key_idx;
}
key_idx = (key_idx+1)%10;
}
Re: Need help using a recorded macro
Posted:
Sun Jul 14, 2019 8:43 am
by Airforce
Yeah, although my numberpad isn't switching files like it should- Did I get it wrong?
- Code: Select all
#pragma METAINFO("<Logan>", 1, 0, "test1")
#include <keyboard.gph>
uint8 key_idx, curr_running;
char* str = "0.gmk";
// Macro Selector
main {
if(key_status((KEY_PAD1 + key_idx))) {
if(curr_running != key_idx) macro_stop();
curr_running = key_idx;
*str = (key_idx == 9) ? '0' : '1' + key_idx;
macro_run(str);
}
key_idx = (key_idx+1)%10;
}
// Macro
main {
if (get_actual(BUTTON_5)) macro_run("0.gmk");
else macro_stop();
}
Re: Need help using a recorded macro
Posted:
Sun Jul 14, 2019 8:50 am
by Mad
Use the last one Buffy posted.
Re: Need help using a recorded macro
Posted:
Mon Jul 15, 2019 3:09 am
by Airforce
Nothing so far is working :(
I'm wondering though, "Include <keyboard.gph>" I have went to the online resources and downloaded/saved that file... I'm wondering since it shows red instead of gold if its an indicator that I'm doing something wrong?