antirecoil_recorder - Anti recoil record and playback
5 posts
• Page 1 of 1
antirecoil_recorder - Anti recoil record and playback
This script may help in getting an idea of the needed anti recoil values for a weapon in a game of your choice.
*Update 1.01* added deadzone and record start options
Hold Left Stick Button pressed longer than 500ms starts record mode, blinks red two times.
Hold Right Stick Button pressed longer than 500ms stops record modem, blinks greeen two times.
In Record mode record starts as soon as L2 and R2 are pressed, it records the movement of the right stick y axis only.
It records up to 6 seconds in 100msec interval.
Try to compensate the recoil of the weapon as best as you can with your right stick y axis.
When you think you have done well save the settings by holding the right stick button down longer than 500ms.
When you now press L2 and R2 the playback will be started and combined with your current right stick y values.
You can view the Interactive configuration to see or alter the values to get an idea of the values used/needed for the weapon in the game of your choice to create your own custom anti recoil scripts.
Have fun.
*Update 1.01* added deadzone and record start options
Hold Left Stick Button pressed longer than 500ms starts record mode, blinks red two times.
Hold Right Stick Button pressed longer than 500ms stops record modem, blinks greeen two times.
In Record mode record starts as soon as L2 and R2 are pressed, it records the movement of the right stick y axis only.
It records up to 6 seconds in 100msec interval.
Try to compensate the recoil of the weapon as best as you can with your right stick y axis.
When you think you have done well save the settings by holding the right stick button down longer than 500ms.
When you now press L2 and R2 the playback will be started and combined with your current right stick y values.
You can view the Interactive configuration to see or alter the values to get an idea of the values used/needed for the weapon in the game of your choice to create your own custom anti recoil scripts.
Have fun.
Last edited by Scachi on Thu Jan 04, 2018 5:21 am, edited 1 time in total.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: antirecoil_recorder - Anti recoil record and playback
Cool THX. But record starts when you press L2 and R2 at the same time, and if you dont move stick at this time you resive 0 levels in the beginning. It's good for joystick, but not for mouse.Yes you can correct them later in inter conf. To my mind it's better to start record when you press L2 and R2 & move stick more then you DZ (or some known recoil) settings. I rebuild it to myself.
- Code: Select all
// instad rtime=clamp(time_active(BUTTON_5)/100,0,59);
if (abs(get_val(STICK_1_Y)) > 21.0){ // 21 - DZ or you can make you's some known recoil
rtime=clamp(time_active(STICK_1_Y)/100,0,59);
.........
}
Last edited by sky418 on Wed Jan 03, 2018 1:51 pm, edited 1 time in total.
-
sky418 - Command Sergeant Major
- Posts: 124
- Joined: Fri Nov 25, 2016 4:28 am
Re: antirecoil_recorder - Anti recoil record and playback
Thank you for sharing, I'll add that as a default set option.
*update 1.01* added deadzone and record start options
*update 1.01* added deadzone and record start options
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: antirecoil_recorder - Anti recoil record and playback
Simple use results of recoil thru massive (example)
If all results are correct you can have very strong recoil for current weapot & make switch massives for others.
May be used with STICK_1_ X as well, in separated bool & massive sections.
- Code: Select all
#pragma METAINFO("ar_example", 1, 01, "sky418")
const uint8 AR_SET[] = { // example massive
// first "30" - AR when shoot second "40" AR in time between shoot and so on
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 40,
30, 40, 30, 40, 30, 30
};
init {
}
main {
if (get_val(BUTTON_8) && get_val(BUTTON_5) ) {
RECOIL();
}
}
bool RECOIL(){
int8 rtime=0;
uint8 i = 0;
int8 anti_recoil = 0;
for (i=0;i<sizeof(AR_SET)-1;i++) {
rtime=clamp(time_active(BUTTON_5)/(1000/(700/60))/2,0,59); // where is 700 you's weapon RPM
anti_recoil = clamp((int8)get_val(STICK_1_Y) + AR_SET[rtime], -100, 100);
}
set_val(STICK_1_Y,anti_recoil);
return i & anti_recoil & rtime;
}
If all results are correct you can have very strong recoil for current weapot & make switch massives for others.
May be used with STICK_1_ X as well, in separated bool & massive sections.
-
sky418 - Command Sergeant Major
- Posts: 124
- Joined: Fri Nov 25, 2016 4:28 am
Re: antirecoil_recorder - Anti recoil record and playback
I am really new to T2. This sounds really cool. I play on PS4. So I would go in game (COD) shoot my gun while recording and then go back into my T2 on the computer and it will show how I tried to control the recoil while I was shooting? Is this correct? If so, how many recordings will it store?
-
canceled2020 - Private First Class
- Posts: 2
- Joined: Thu Jul 15, 2021 6:25 pm
5 posts
• Page 1 of 1
Return to User's Script Documentation
Who is online
Users browsing this forum: No registered users and 115 guests