{"name":"BIS_fnc_unitCapture","title":"BIS fnc unitCapture","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_unitCapture","revid":347970,"updated":"2023-11-08T09:41:00Z","groups":["Scenes"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","exec":"spawn","description":"Records movement data of input unit over a specified period of time. Simplified.\nPressing the <kbd>Esc</kbd> key, the duration ending, or the unit dying ends the recording.\nCopies to clipboard an Array in format [frameTime, unitPosition, unitDirectionVector, unitUpVector, unitVelocity] for each frame.","syntaxes":[{"syntax":"[unit, duration, FPS, firing, startTime] spawn BIS_fnc_unitCapture","params":[{"name":"unit","type":"Object","description":"unit from which to capture movement data","type_expr":"Object"},{"name":"duration","type":"Number","description":"capture's maximum duration","type_expr":"Number"},{"name":"FPS","type":"Number","optional":true,"default":"20","description":"frames recorded per second. Range is 1..100","type_expr":"Number","text":"FPS: Number - (Optional, default 20) frames recorded per second (default 20). Range is 1..100"},{"name":"firing","type":"Boolean","optional":true,"default":"false","description":"if set to true, will record the input unit's weapon fire data as well","type_expr":"Boolean","text":"firing: Boolean - (Optional, default false) if set to true, will record the input unit's weapon fire data as well"},{"name":"startTime","type":"Number","optional":true,"default":"0","description":"starting time offset for the frame time","type_expr":"Number","text":"startTime: Number - (Optional, default 0) starting time offset for the frame time"}],"returns":{"type":"Script Handle","type_expr":"Script Handle"}}],"examples":[{"code":["[BIS_Vehicle, 50, 30, true, 10] spawn BIS_fnc_unitCapture;"]}],"see_also":["BIS_fnc_unitCaptureFiring","BIS_fnc_unitCaptureSimple","BIS_fnc_unitPlaySimple","BIS_fnc_unitPlayFiring","BIS_fnc_unitPlay","BIS_fnc_scriptedMove"],"notes":[{"user":"Benargee","date":"2014-09-29T21:31:00Z","text":"Video Tutorial by **[TheJserver](https://www.youtube.com/channel/UCY63DNbVREJIaANChQhYDTA)**\nArma 2: Operation Arrowhead v1.56 **Part 1:** <https://www.youtube.com/watch?v=ryB20wQhSr0>\nArma 2: Operation Arrowhead v1.56 **Part 2:** <https://www.youtube.com/watch?v=ePszdYfMRvc>\n*Works exactly the same in Arma 3 in my experience.*"}]}