BIS fnc unitCapture: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (example added)
m (pf)
Line 1: Line 1:
{{Function|Comments=
____________________________________________________________________________________________
| arma2oa |Game name=


{{Function|= Comments
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2oa |= Game name
| Records movement data of input unit over a specified period of time. Simplified.
Pressing the ESC key, the duration ending, or the unit dying ends
the recording.<br>Copies to clipboard:<br>
Array in format [FrameTime, UnitPosition, UnitDirectionVector, UnitUpVector, UnitVelocity] for each frame |Description=
____________________________________________________________________________________________


|1.00|= Game version
| [unit, duration, FPS, firing, startTime] spawn [[BIS_fnc_UnitCapture]] |Syntax=
____________________________________________________________________________________________


| <pre>
/*
File: fn_UnitCapture.sqf


Description:
|p1= unit: [[Object]] - Unit to capture movement data from |Parameter 1=
Records movement data of input unit over a specified period of time.
Pressing the ESC key, the duration ending, or the unit dying ends
the recording.


Parameters:
|p2= duration: [[Array]] - Duration to capture for|Parameter 2=
Unit - Unit to capture movement data from
Duration - Duration to capture for
OPT:FPS - OPTIONAL: Frames recorded Per Second (default 20). Limit is 1 - 100
OPT:Firing - OPTIONAL: If true, will record the input unit's weapon fire data as well
OPT:StartTime - OPTIONAL: Starting time offset for the frame time


Copies to clipboard:
|p3= FPS: [[Number]] - (Optional, default 20) Frames recorded per second (default 20). Limit is 1 - 100|Parameter 3=
Array in format [FrameTime, UnitPosition, UnitDirectionVector, UnitUpVector, UnitVelocity] for each frame
Input Examples:
a) [BIS_Vehicle, 50, 30, true, 10] spawn BIS_fnc_UnitCapture;
Which would capture data from a unit named BIS_Vehicle, would capture for 50 seconds, would capture at 30 FPS,
and would also record the unit's weapon fire data as well. Frame time offset would be 10 seconds.
b) [BIS_Vehicle, 50] spawn BIS_fnc_UnitCapture;
Which would capture data from a unit named BIS_Vehicle, and would capture for 50 seconds.


Output Example:
|p4= Firing: [[Boolean]] - (Optional, default [[false]]) If [[true]], will record the input unit's weapon fire data as well|Parameter 4=
a) [[0,[8208.26,1953.13,296.04],[0,1,0],[0.000174453,0,1],[0,0,0]],[1.021,[8208.26,1953.13,296.04],[0,1,0],[0.000174453,0,1],[0,0,0]]]
The above output has 2 frames.
b) [[0,[8208.26,1953.13,296.04],[0,1,0],[0.000174453,0,1],[0,0,0]]]
The above output has 1 frame.
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p5= startTime: [[Number]] - (Optional, default 0) Starting time offset for the frame time |Parameter 5=
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_UnitCapture]]; --> |= Syntax


|p1= |= Parameter 1
| [[Script]] - Script handle |Return value=


| |= Return value
|exec= spawn |= Execution
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[vehicle player, 60] spawn BIS_fnc_UnitCapture</code> |=  
|x1= <code>[BIS_Vehicle, 50, 30, true, 10] [[spawn]] [[BIS_fnc_UnitCapture]];</code>|Example 1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[BIS_fnc_UnitPlay]][[BIS_fnc_UnitCaptureFiring]][[BIS_fnc_UnitCaptureSimple]]|= See also
| [[BIS_fnc_UnitCaptureFiring]], [[BIS_fnc_UnitCaptureSimple]], [[BIS_fnc_UnitPlaySimple]], [[BIS_fnc_UnitPlayFiring]], [[BIS_fnc_UnitPlay]] |See also=
 
}}
}}



Revision as of 14:12, 11 June 2018

Hover & click on the images for description

Description

Description:
Records movement data of input unit over a specified period of time. Simplified. Pressing the ESC key, the duration ending, or the unit dying ends the recording.
Copies to clipboard:
Array in format [FrameTime, UnitPosition, UnitDirectionVector, UnitUpVector, UnitVelocity] for each frame
Execution:
spawn
Groups:
Uncategorised

Syntax

Syntax:
[unit, duration, FPS, firing, startTime] spawn BIS_fnc_UnitCapture
Parameters:
unit: Object - Unit to capture movement data from
duration: Array - Duration to capture for
FPS: Number - (Optional, default 20) Frames recorded per second (default 20). Limit is 1 - 100
Firing: Boolean - (Optional, default false) If true, will record the input unit's weapon fire data as well
startTime: Number - (Optional, default 0) Starting time offset for the frame time
Return Value:
Script - Script handle

Examples

Example 1:
[BIS_Vehicle, 50, 30, true, 10] spawn BIS_fnc_UnitCapture;

Additional Information

See also:
BIS_fnc_UnitCaptureFiringBIS_fnc_UnitCaptureSimpleBIS_fnc_UnitPlaySimpleBIS_fnc_UnitPlayFiringBIS_fnc_UnitPlay

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section

Posted on September 29, 2014 - 21:31 (UTC)
Benargee
Video Tutorial by TheJserver
A2 OA Logo.png1.56Part 1: https://www.youtube.com/watch?v=ryB20wQhSr0
A2 OA Logo.png1.56Part 2: https://www.youtube.com/watch?v=ePszdYfMRvc
Works exactly the same in Arma 3 to my experience.