Jump to content
TedHo

[Functions] UnitCapture/UnitPlay for Infantry Units in ArmA 3

Recommended Posts

2 hours ago, praising said:

I guess that  you didn't change the name of the data in your CaptureData2.sqf and in your play2.sqf . In your CaptureData2.sqf you need to change the name of the data, and do the same for your play2.sqf .

 

Your CaptureData2 should be like this;


HLF_moveData2 = [ whatever data you recorded];
HLF_fireData2 = [whatever data your recorded];
HLF_animData2 = [whatver data you recorded];


And your play2.sqf should be like this;


_unit = _this select 0;
{_unit disableAI _x;} forEach ["ANIM","MOVE","FSM","TARGET","AUTOTARGET"];
[_unit, HLF_moveData2] spawn BIS_fnc_UnitPlay;
[_unit, HLF_fireData2, true] spawn HLF_fnc_infUnitPlayFiring;
[_unit, HLF_animData2, true] spawn HLF_fnc_infUnitPlayAnim;

 If you would need a 3rd unit playing aswell, you would name the data in your CaptureData3.sqf , HLF_movedata3, HLF_fireData3,etc... and. And do the same for your play3.sqf

 

Hope that helps.

 

Alright I got it working. But for some reason now. One of the units seems to want to keep starring to his right. But there are no units on his right. And he's not grouped with any other blufor unit. But I didn't do anything to make him stop starring at unit 1. Any reason why this might be happening?

Share this post


Link to post
Share on other sites

@igame360

This script doesn't record head movements as stated  by the OP's in his 1st post. Even if you made the unit turn his head left or right while recording, it would not appear while playing back the sequence because those head movement haven't been recorded.  Whenever I've used this script, the units playing the movement/anim sequence turn their heads a bit here and there ( I guess depending on what's around them), but they will mostly just stare at whatever direction their body is facing.

Share this post


Link to post
Share on other sites
21 hours ago, igame360 said:

Alright I got it working. But for some reason now. One of the units seems to want to keep starring to his right. But there are no units on his right. And he's not grouped with any other blufor unit. But I didn't do anything to make him stop starring at unit 1. Any reason why this might be happening?

 

This is Arma being Arma. Many a nice shot has been ruined by having AI run in one direction and look constantly in another.

 

how I fix it is by disabling AI features. Not sure if the following are in the vanilla editor and I’m answering from work and off the top of my head but I disable the following by going into the AI character ‘attributes’ , find the disable AI section and check;

 

FSM

BEHAVIOUR

 

(and something is missing I think, I’ll check tonight)

 

this should fix fix the issue.

Share this post


Link to post
Share on other sites

I used unit capture and animations for the below trailer.

 

  • Like 3

Share this post


Link to post
Share on other sites

I'm using this function, and other than a few minor hiccups, it's working pretty well.

 

However, there is an issue I was wondering if anyone has a solution for.  I have a unit that I want to have his IR weapon laser on. I put the unit in Combat mode, and use, This enableIRlasers true;, and it works at first, but as soon as the unit fires his weapon, the laser is turned off.

 

Does anyone know how to resolve this issue? 

Share this post


Link to post
Share on other sites

I followed the tutorial by Ceb Cin, It all worked perfectly besides when I tried the vehicles, I think I followed everything he said, but still I get the F1 F2 F3 option after I stop recording, instead of the single F1

Does anyone know what might have happen?

https://www.youtube.com/watch?v=V2fWndbgtDA&ab_channel=CebCin

Share this post


Link to post
Share on other sites
On 2/28/2021 at 1:55 PM, Daniel Murjal said:

I followed the tutorial by Ceb Cin, It all worked perfectly besides when I tried the vehicles, I think I followed everything he said, but still I get the F1 F2 F3 option after I stop recording, instead of the single F1

Does anyone know what might have happen?

https://www.youtube.com/watch?v=V2fWndbgtDA&ab_channel=CebCin

 

 

If you only want to record a vehicle, you should only record the the vehicle path. Put only this in your record trigger, [car1, wp1] spawn BIS_fnc_Unitplay; 

Share this post


Link to post
Share on other sites

Hello, im only wondering if this script records leaning and other similar animations, because i cant get it to work with leaning, i am just wondering if this is an issue on my side or if the script wont record that animation.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×