Titan 2 New user script support
5 posts
• Page 1 of 1
Titan 2 New user script support
Hello. I purchased a titan 2 this week and extremely new to scripting. I’m trying to write a basic script for Xbox One but I’m struggling
If anyone could give me a hand I’d appreciate it. My goal is when I press Button_7 I automatically run a combo. The combo is simple it’s just YY (Button_ 14) twice. If it helps it’s for the game Halo 5 and I’m trying to do the Grenade animation stop by using the change weapon double tap. Thanks in advance
If anyone could give me a hand I’d appreciate it. My goal is when I press Button_7 I automatically run a combo. The combo is simple it’s just YY (Button_ 14) twice. If it helps it’s for the game Halo 5 and I’m trying to do the Grenade animation stop by using the change weapon double tap. Thanks in advance
-
Lifty - Corporal
- Posts: 4
- Joined: Tue Aug 13, 2019 12:23 am
Re: Titan 2 New user script support
If you want to learn more about scripting, Scachi wrote this well explained basic guide:
viewforum.php?f=26
Now, I don't know if L1 (BUTTON_7) has a crucial action for the game, so you might don't want to override it.
For case like yours, what I prefer to do is: create a script that if you quick tap Y it will press Y two times, but if you press Y for a bit longer (250ms) you have regular Y action. What you think? this could work for you?
viewforum.php?f=26
Now, I don't know if L1 (BUTTON_7) has a crucial action for the game, so you might don't want to override it.
For case like yours, what I prefer to do is: create a script that if you quick tap Y it will press Y two times, but if you press Y for a bit longer (250ms) you have regular Y action. What you think? this could work for you?
-
alanmcgregor - Major
- Posts: 995
- Joined: Tue Mar 27, 2018 8:38 am
Re: Titan 2 New user script support
Try this:
- Code: Select all
main {
if(event_active(6)) combo_run(Cancel);
}
combo Cancel {
set_val(13, 100.0);
wait(40);
wait(40);
set_val(13, 100.0);
wait(40);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Titan 2 New user script support
This is the other option I commented earlier.
- Code: Select all
#pragma METAINFO("Double Press", 1, 0, "alanmcgregor")
#define MaxTimePressed 200
#define TimeBeforeNextPress 100 // reduce this value for faster double Y tap
main {
//If quick Tap for Double Y Press. Press Y a bit longer for regular Y action
if(event_release(BUTTON_14) && (time_active(BUTTON_14) <= MaxTimePressed)) {
combo_run(cDoublePressY);
}
}
combo cDoublePressY{
wait(TimeBeforeNextPress);
set_val(BUTTON_14, 100.0);
wait(50);
}
-
alanmcgregor - Major
- Posts: 995
- Joined: Tue Mar 27, 2018 8:38 am
Re: Titan 2 New user script support
Thanks for the quick replies! The Button_7 is the throw grenade command and the Button_14 is the change weapon command.
Using your script alanmcgregor I changed the button_14 to button_7 because that is the action command. This works pretty well so that I can hold button_7 and the normal grenade throw animation occurs, and if I doubletap the button_7 the grenade animation stop occurs (which I want).
Is there a way I can only tap button_7 ONCE and I get the grenade animation stop response?
Thanks a bunch!
#pragma METAINFO("Double Press", 1, 0, "alanmcgregor")
#define MaxTimePressed 200
#define TimeBeforeNextPress 50 // reduce this value for faster double Y tap
main {
//If quick Tap for Double Y Press. Press Y a bit longer for regular Y action
if(event_release(BUTTON_7) && (time_active(BUTTON_7) <= MaxTimePressed)) {
combo_run(cDoublePressY);
}
}
combo cDoublePressY{
wait(TimeBeforeNextPress);
set_val(BUTTON_14, 100.0);
wait(50);
}
Using your script alanmcgregor I changed the button_14 to button_7 because that is the action command. This works pretty well so that I can hold button_7 and the normal grenade throw animation occurs, and if I doubletap the button_7 the grenade animation stop occurs (which I want).
Is there a way I can only tap button_7 ONCE and I get the grenade animation stop response?
Thanks a bunch!
#pragma METAINFO("Double Press", 1, 0, "alanmcgregor")
#define MaxTimePressed 200
#define TimeBeforeNextPress 50 // reduce this value for faster double Y tap
main {
//If quick Tap for Double Y Press. Press Y a bit longer for regular Y action
if(event_release(BUTTON_7) && (time_active(BUTTON_7) <= MaxTimePressed)) {
combo_run(cDoublePressY);
}
}
combo cDoublePressY{
wait(TimeBeforeNextPress);
set_val(BUTTON_14, 100.0);
wait(50);
}
-
Lifty - Corporal
- Posts: 4
- Joined: Tue Aug 13, 2019 12:23 am
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 92 guests