Need help using a recorded macro
18 posts
• Page 1 of 2 • 1, 2
Need help using a recorded macro
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?
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?
-
Airforce - Staff Sergeant
- Posts: 12
- Joined: Wed Jul 10, 2019 5:46 pm
Re: Need help using a recorded macro
https://www.consoletuner.com/wiki/index ... key_status
https://www.consoletuner.com/wiki/index ... :macro_run
https://www.consoletuner.com/wiki/index ... :macro_run
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Need help using a recorded macro
- Code: Select all
#include <keyboard.gph>
uint8 key_idx, curr_running;
main {
if(key_status((KEY_PAD1 + key_idx))) {
if(curr_running != key_idx) macro_stop();
curr_running = key_idx;
char* str = "n.gmk";
*str = (key_idx == 9) ? '0' : '1' + key_idx;
macro_run(str);
}
key_idx = (key_idx+1)%10;
}
-
Buffy - Lieutenant
- Posts: 422
- Joined: Wed Jul 20, 2016 5:23 am
Re: Need help using a recorded macro
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?
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?
-
Airforce - Staff Sergeant
- Posts: 12
- Joined: Wed Jul 10, 2019 5:46 pm
Re: Need help using a recorded macro
- 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
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Need help using a recorded macro
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.
-
Airforce - Staff Sergeant
- Posts: 12
- Joined: Wed Jul 10, 2019 5:46 pm
Re: Need help using a recorded macro
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;
}
-
Buffy - Lieutenant
- Posts: 422
- Joined: Wed Jul 20, 2016 5:23 am
Re: Need help using a recorded macro
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();
}
-
Airforce - Staff Sergeant
- Posts: 12
- Joined: Wed Jul 10, 2019 5:46 pm
Re: Need help using a recorded macro
Use the last one Buffy posted.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Need help using a recorded macro
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?
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?
-
Airforce - Staff Sergeant
- Posts: 12
- Joined: Wed Jul 10, 2019 5:46 pm
18 posts
• Page 1 of 2 • 1, 2
Return to GPC2 Script Programming
Who is online
Users browsing this forum: midg3t2 and 206 guests