Fighting Templates

Documentation, usage tips and configuration guides for Titan Two scripts and bytecodes published by the community users.

Re: Fighting Templates

Postby abbasbj » Fri Jun 19, 2020 6:56 pm

:unsure:
Last edited by abbasbj on Thu Aug 06, 2020 8:06 am, edited 1 time in total.
User avatar
abbasbj
First Sergeant
First Sergeant
 
Posts: 58
Joined: Sat Feb 01, 2020 10:16 pm

Re: Fighting Templates

Postby Prototype » Sat Jun 20, 2020 6:20 am

No problem, i'm here to help. That's because the sticks outputs are disabled to avoid combos failure. Remove these lines if you want:
Code: Select all
    set_val(STICK_2_X, 0.0); // Disable stick outputs
    set_val(STICK_2_Y, 0.0);
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3251
Joined: Sun Dec 16, 2012 1:43 pm

Re: Fighting Templates

Postby abbasbj » Sat Jun 20, 2020 12:08 pm

I did this myself. But I asked because I wondered if I deleted something wrong, but it was true. Thanks. I made my comment on amazon.com and wish you success
User avatar
abbasbj
First Sergeant
First Sergeant
 
Posts: 58
Joined: Sat Feb 01, 2020 10:16 pm

Re: Fighting Templates

Postby Prototype » Sat Jun 20, 2020 5:48 pm

:joia:
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3251
Joined: Sun Dec 16, 2012 1:43 pm

Re: Fighting Templates

Postby abbasbj » Sun Oct 25, 2020 4:34 pm

// RIGHT STICK TRACKING
angleRS = rad2deg(atan2(get_actual(STICK_1_X), get_actual(STICK_1_Y)));
if(sqrt(sq(get_actual(STICK_1_Y))+sq(get_actual(STICK_1_X))) > 30.0) {
if((angleRS < -157.5 && angleRS >= -180.0)
|| (angleRS > 157.5 && angleRS <= 180.0)) {
run_macroRS(1); // UP
} else if(angleRS > -157.5 && angleRS <= -112.5) {
run_macroRS(2); // UP LEFT
} else if(angleRS > -112.5 && angleRS <= -67.5) {
run_macroRS(3); // LEFT
} else if(angleRS > -67.5 && angleRS <= -22.5) {
run_macroRS(4); // DOWN LEFT
} else if(angleRS > -22.5 && angleRS <= 22.5) {
run_macroRS(5); // DOWN
} else if(angleRS > 22.5 && angleRS <= 67.5) {
run_macroRS(6); // DOWN RIGHT
} else if(angleRS > 67.5 && angleRS <= 112.5) {
run_macroRS(7); // RIGHT
} else if(angleRS > 112.5 && angleRS <= 157.5) {
run_macroRS(8); // UP RIGHT
}
}

first 2 lines. So I'm having trouble with direction number one.if((angleRS < -157.5 && angleRS >= -180.0)
|| (angleRS > 157.5 && angleRS <= 180.0))
maybe my macros could be corrupted. but these lines are strange. (relative to other lines). Can they be written in another way? does not detect at a small angle
User avatar
abbasbj
First Sergeant
First Sergeant
 
Posts: 58
Joined: Sat Feb 01, 2020 10:16 pm

Re: Fighting Templates

Postby Prototype » Tue Oct 27, 2020 5:47 am

Not so strange for me, it works just fine. You can change the 30.0 here:
if(sqrt(sq(get_actual(STICK_1_Y))+sq(get_actual(STICK_1_X))) > 30.0) {
to detect at a smaller input.
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3251
Joined: Sun Dec 16, 2012 1:43 pm

Re: Fighting Templates

Postby abbasbj » Tue Oct 27, 2020 11:01 am

yes it works perfectly. No need to change anything. There was a problem with macros. I apologize for stealing the time of valuable and great software developers like you.
User avatar
abbasbj
First Sergeant
First Sergeant
 
Posts: 58
Joined: Sat Feb 01, 2020 10:16 pm

Re: Fighting Templates

Postby Prototype » Wed Oct 28, 2020 7:58 am

abbasbj wrote:yes it works perfectly. No need to change anything. There was a problem with macros.

Yes you are right. I've found a bug/undesired behavior with the macros that i reported to J2K and he have found a way to fix/improve. This is the reason for the latest firmware update:
2020-10-23, Ver 1.08-1
* GPC VM: Compensation for the delay caused by opening the macro file when calling macro_run()

It works perfectly now.
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3251
Joined: Sun Dec 16, 2012 1:43 pm

Re: Fighting Templates

Postby Prototype » Fri Nov 13, 2020 6:18 pm

abbasbj wrote:// RIGHT STICK TRACKING
angleRS = rad2deg(atan2(get_actual(STICK_1_X), get_actual(STICK_1_Y)));
if(sqrt(sq(get_actual(STICK_1_Y))+sq(get_actual(STICK_1_X))) > 30.0) {
if((angleRS < -157.5 && angleRS >= -180.0)
|| (angleRS > 157.5 && angleRS <= 180.0)) {
run_macroRS(1); // UP
} else if(angleRS > -157.5 && angleRS <= -112.5) {
run_macroRS(2); // UP LEFT
} else if(angleRS > -112.5 && angleRS <= -67.5) {
run_macroRS(3); // LEFT
} else if(angleRS > -67.5 && angleRS <= -22.5) {
run_macroRS(4); // DOWN LEFT
} else if(angleRS > -22.5 && angleRS <= 22.5) {
run_macroRS(5); // DOWN
} else if(angleRS > 22.5 && angleRS <= 67.5) {
run_macroRS(6); // DOWN RIGHT
} else if(angleRS > 67.5 && angleRS <= 112.5) {
run_macroRS(7); // RIGHT
} else if(angleRS > 112.5 && angleRS <= 157.5) {
run_macroRS(8); // UP RIGHT
}
}

first 2 lines. So I'm having trouble with direction number one.if((angleRS < -157.5 && angleRS >= -180.0)
|| (angleRS > 157.5 && angleRS <= 180.0))
maybe my macros could be corrupted. but these lines are strange. (relative to other lines). Can they be written in another way?

I can explain what's the deal here:
Code: Select all
angleRS = rad2deg(atan2(get_actual(STICK_1_X), get_actual(STICK_1_Y)));

atan2 takes the radius of the stick and rad2deg convert it into degrees.

Code: Select all
if(sqrt(sq(get_actual(STICK_1_Y))+sq(get_actual(STICK_1_X))) > 30.0) {

This one takes the position of the stick in a circle deadzone instead of a squared deadzone.

I hope that helps.
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3251
Joined: Sun Dec 16, 2012 1:43 pm

Re: Fighting Templates

Postby Battledj » Fri Nov 20, 2020 10:55 pm

Hello, i have tested the template with a combo, but how do you stop a combo? Thx.
User avatar
Battledj
Sergeant
Sergeant
 
Posts: 6
Joined: Fri Nov 13, 2020 11:05 pm

PreviousNext

Return to User's Script Documentation

Who is online

Users browsing this forum: No registered users and 62 guests