Fighting Templates
43 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Re: Fighting Templates
Last edited by abbasbj on Thu Aug 06, 2020 8:06 am, edited 1 time in total.
-
abbasbj - First Sergeant
- Posts: 58
- Joined: Sat Feb 01, 2020 10:16 pm
Re: Fighting Templates
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!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3252
- Joined: Sun Dec 16, 2012 1:43 pm
Re: Fighting Templates
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
-
abbasbj - First Sergeant
- Posts: 58
- Joined: Sat Feb 01, 2020 10:16 pm
Re: Fighting Templates
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3252
- Joined: Sun Dec 16, 2012 1:43 pm
Re: Fighting Templates
// 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
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
-
abbasbj - First Sergeant
- Posts: 58
- Joined: Sat Feb 01, 2020 10:16 pm
Re: Fighting Templates
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.
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!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3252
- Joined: Sun Dec 16, 2012 1:43 pm
Re: Fighting Templates
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.
-
abbasbj - First Sergeant
- Posts: 58
- Joined: Sat Feb 01, 2020 10:16 pm
Re: Fighting Templates
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!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3252
- Joined: Sun Dec 16, 2012 1:43 pm
Re: Fighting Templates
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!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3252
- Joined: Sun Dec 16, 2012 1:43 pm
Re: Fighting Templates
Hello, i have tested the template with a combo, but how do you stop a combo? Thx.
-
Battledj - Sergeant
- Posts: 6
- Joined: Fri Nov 13, 2020 11:05 pm
43 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Return to User's Script Documentation
Who is online
Users browsing this forum: No registered users and 199 guests