Converting Script to Titan One
16 posts
• Page 1 of 2 • 1, 2
Converting Script to Titan One
Hello all
I know very little about programming just some basic python. How would I find and get rid of the errors I get when I try to load a script onto the titan. I want to use the apex legends script that someone made but I get build errors.
I know very little about programming just some basic python. How would I find and get rid of the errors I get when I try to load a script onto the titan. I want to use the apex legends script that someone made but I get build errors.
-
what a chach - Corporal
- Posts: 5
- Joined: Sun Feb 10, 2019 6:27 pm
Re: Converting Script to Titan One
We can help fix the compiling errors if you post the script code here. Thanks
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Converting Script to Titan One
Hi Everyone, I'm not that proficient with scripting.
I need help as I'm not sure if the "int's or main is workable.
I've created this script to play Mass Effect on XB1 using a PS4 Controller.
I'm happy with the remapping HOWEVER I want to create a script to toggle:
1) ADS TOGGLE using my remapped config from XB1_LT to PS4_SQUARE
2) Powers TOGGLE using my remapped config from XB1_RB to PS4_L2
I need help as I'm not sure if the "int's or main is workable.
I've created this script to play Mass Effect on XB1 using a PS4 Controller.
I'm happy with the remapping HOWEVER I want to create a script to toggle:
1) ADS TOGGLE using my remapped config from XB1_LT to PS4_SQUARE
2) Powers TOGGLE using my remapped config from XB1_RB to PS4_L2
- Code: Select all
remap XB1_X -> PS4_DOWN;
remap XB1_RIGHT -> PS4_OPTIONS;
remap XB1_Y -> PS4_R1;
remap XB1_RT -> PS4_L1; //Fire
remap XB1_LT -> PS4_SQUARE; //Aim
remap XB1_LB -> PS4_R2; //Weapons
remap XB1_RB -> PS4_L2; //Powers
int rt_hold = FALSE;
int AIM = XB1_X;
int POWERS = XB1_LT;
main {
if(event_press(XB1_X)){
rt_hold = !rt_hold;
}
if(rt_hold){
set_val(XB1_LT, 100);
}else if(!rt_hold){
set_val(XB1_LT, 0);
}
if(event_press(XB1_LT)){
rt_hold = !rt_hold;
}
if(rt_hold){
set_val(XB1_RB, 100);
}else if(!rt_hold){
set_val(XB1_RB, 0);
}
}
-
vivekg - Staff Sergeant
- Posts: 11
- Joined: Sun Feb 17, 2019 6:32 pm
Re: Converting Script to Titan One
Please checked the changes I made in your script:
Note that, with the Titan One, the remap is applied AFTER the main routine, as such the script should be coded with the actual buttons you are pressing on the controller. Here SQUARE to aim and L2 for powers.
- Code: Select all
remap XB1_X -> PS4_DOWN;
remap XB1_RIGHT -> PS4_OPTIONS;
remap XB1_Y -> PS4_R1;
remap XB1_RT -> PS4_L1; // Fire
remap XB1_LT -> PS4_SQUARE; // Aim
remap XB1_LB -> PS4_R2; // Weapons
remap XB1_RB -> PS4_L2; // Powers
int ads_toggle = FALSE;
int powers_toggle = FALSE;
main {
if(event_press(PS4_SQUARE)) {
ads_toggle = !ads_toggle;
}
if(ads_toggle) {
set_val(PS4_SQUARE, 100);
} else {
set_val(PS4_SQUARE, 0);
}
if(event_press(PS4_L2)) {
powers_toggle = !powers_toggle;
}
if(powers_toggle) {
set_val(PS4_L2, 100);
} else {
set_val(PS4_L2, 0);
}
}
Note that, with the Titan One, the remap is applied AFTER the main routine, as such the script should be coded with the actual buttons you are pressing on the controller. Here SQUARE to aim and L2 for powers.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Converting Script to Titan One
Awesome, thank you. Can't wait to check it out in action
Yeah, that's what confused me. But you've taught me something new.
Yeah, that's what confused me. But you've taught me something new.
-
vivekg - Staff Sergeant
- Posts: 11
- Joined: Sun Feb 17, 2019 6:32 pm
Re: Converting Script to Titan One
It's still toggling both L2+R1 commands on one button ->> PS4_L2 <<- like a combo.
I've decided to unmap ->> PS4_L2 & PS4_R1 <<- first, then do the remapping, main and hopefully done. Would that work?
I've decided to unmap ->> PS4_L2 & PS4_R1 <<- first, then do the remapping, main and hopefully done. Would that work?
-
vivekg - Staff Sergeant
- Posts: 11
- Joined: Sun Feb 17, 2019 6:32 pm
Re: Converting Script to Titan One
Based in your feedback I believe the remapping is not correct. Please provide the button mapping list you want, so I can fix the script. something like:
L2 to activate L1
L1 to activate L2
R2 to activate SQUARE
SQUARE to activate TRIANGLE
TRIANGLE to activate R2
...
Thank you
L2 to activate L1
L1 to activate L2
R2 to activate SQUARE
SQUARE to activate TRIANGLE
TRIANGLE to activate R2
...
Thank you
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Converting Script to Titan One
Thank you for your reply & assistance.
Yes, I agree. Scripting is very particular initially, so I'm learning from mistakes.
Below is a clear idea of what button mapping assistance I need:
BUTTONS
PS4_R1 ---> to activate ---> PS4_SQUARE (Reload/Swap)
PS4_R2 ---> to activate ---> PS4_L1 (Weapon Wheel)
PS4_L1 ---> to activate ---> PS4_R2 (Fire)
*TOGGLE PLEASE*
PS4_L2 ---> to activate ---> PS4_R1 (Power Wheel)
*TOGGLE PLEASE*
PS4_SQUARE ---> to activate ---> PS4_L2 (Aim/ADS)
PS4_DOWN ---> to activate ---> PS4_SQUARE (Main Power)
PS4_RIGHT ---> to activate ---> PS4_OPTIONS
PS4_TOUCHY SWIPE UP ---> to activate ---> PS4_RIGHT
PS4_TOUCHY SWIPE DOWN --> to activate ---> PS4_LEFT
I appreciate your time & effort.
Yes, I agree. Scripting is very particular initially, so I'm learning from mistakes.
Below is a clear idea of what button mapping assistance I need:
BUTTONS
PS4_R1 ---> to activate ---> PS4_SQUARE (Reload/Swap)
PS4_R2 ---> to activate ---> PS4_L1 (Weapon Wheel)
PS4_L1 ---> to activate ---> PS4_R2 (Fire)
*TOGGLE PLEASE*
PS4_L2 ---> to activate ---> PS4_R1 (Power Wheel)
*TOGGLE PLEASE*
PS4_SQUARE ---> to activate ---> PS4_L2 (Aim/ADS)
PS4_DOWN ---> to activate ---> PS4_SQUARE (Main Power)
PS4_RIGHT ---> to activate ---> PS4_OPTIONS
PS4_TOUCHY SWIPE UP ---> to activate ---> PS4_RIGHT
PS4_TOUCHY SWIPE DOWN --> to activate ---> PS4_LEFT
I appreciate your time & effort.
-
vivekg - Staff Sergeant
- Posts: 11
- Joined: Sun Feb 17, 2019 6:32 pm
Re: Converting Script to Titan One
Thank you, here is the script with working remapping.
Please note "PS4_DOWN ---> to activate ---> PS4_SQUARE (Main Power)" was not included because PS4_SQUARE is already in use for Reload/Swap. The touch swipes were also not added yet. Please check/test the remapping and toggle functions, with everything good we proceed to add the swipe detection and mapping.
- Code: Select all
remap PS4_R1 -> PS4_SQUARE; // (Reload/Swap)
remap PS4_SQUARE -> PS4_L2; // (Aim/ADS) TOGGLE
remap PS4_L2 -> PS4_R1; // (Power Wheel) TOGGLE
remap PS4_R2 -> PS4_L1; // (Weapon Wheel)
remap PS4_L1 -> PS4_R2; // (Fire)
remap PS4_RIGHT -> PS4_OPTIONS;
remap PS4_OPTIONS -> PS4_RIGHT;
int ads_toggle = FALSE;
int powers_toggle = FALSE;
main {
if(event_press(PS4_SQUARE)) {
ads_toggle = !ads_toggle;
}
if(ads_toggle) {
set_val(PS4_SQUARE, 100);
} else {
set_val(PS4_SQUARE, 0);
}
if(event_press(PS4_L2)) {
powers_toggle = !powers_toggle;
}
if(powers_toggle) {
set_val(PS4_L2, 100);
} else {
set_val(PS4_L2, 0);
}
}
Please note "PS4_DOWN ---> to activate ---> PS4_SQUARE (Main Power)" was not included because PS4_SQUARE is already in use for Reload/Swap. The touch swipes were also not added yet. Please check/test the remapping and toggle functions, with everything good we proceed to add the swipe detection and mapping.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Converting Script to Titan One
Cheers, I'll test it out & get back to you.
-
vivekg - Staff Sergeant
- Posts: 11
- Joined: Sun Feb 17, 2019 6:32 pm
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 100 guests