BIS fnc unitPlayFiring: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Fix Script link)
 
(35 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma2oa
____________________________________________________________________________________________
|version1= 1.50


| arma2oa |= Game name
|game2= tkoh
|version2= 1.00


|1.00|= Game version
|game3= arma3
____________________________________________________________________________________________
|version3= 0.50


| <pre>
|gr1= Scenes
/*
File: fn_UnitPlayFiring.sqf


Description:
|descr= Plays back input weapon fire data on input unit.
Plays back input weapon fire data on input unit.


Parameters:
|s1= [unit, data, stateIgnore] spawn [[BIS_fnc_unitPlayFiring]]
Unit - Unit to play weapon fire data on
Data - Weapon fire data to use
OPT:IgnoreDisabled - OPTIONAL: Whether to ignore if the Unit is dead and/or cannot move


Example (used in a script):
|p1= unit: [[Object]] - unit to play weapon fire data on
a) _capturedFireData = [[2.135,"GAU8","<NULL-object>"]];
[BIS_Vehicle, _capturedData, true] spawn BIS_fnc_UnitPlayFiring;
Which would play back the captured data in the _capturedFireData array (containing only one frame in this example)
onto a unit named BIS_Vehicle. Playback will play even if the unit is dead or disabled.
Note that in a very large captured sequence, it is a better idea to preprocess the data prior to mission start, or
a short freeze would occur as it reads the data. For example using the following in the mission's init:
UnitData = compile preprocessFile "PlayBackUnit.sqf";


..And then later start the sequence like this:
|p2= data: [[Array]] - firing data to use [[BIS_fnc_unitCaptureFiring]]
// Start the sequence
_result = [] call UnitData;
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p3= stateIgnore: [[Boolean]] - (Optional, default [[false]]) whether to ignore if the Unit is dead and/or cannot move
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_UnitPlayFiring]]; --> |= Syntax
|r1= [[Script Handle]]


|p1= |= Parameter 1
|exec= spawn


| |= Return value
|x1= <sqf>
____________________________________________________________________________________________
private _capturedFireData = [[2.135, "GAU8", "<NULL-object>"]];
 
[BIS_Vehicle, _capturedData, true] spawn BIS_fnc_unitPlayFiring;
|x1= <code></code> |=
</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso= [[BIS_fnc_unitCaptureFiring]] [[BIS_fnc_unitCaptureSimple]] [[BIS_fnc_unitPlaySimple]] [[BIS_fnc_unitCapture]] [[BIS_fnc_unitPlay]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Scenes|{{uc:UnitPlayFiring}}]]
[[Category:Functions|{{uc:UnitPlayFiring}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:UnitPlayFiring}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:UnitPlayFiring}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:UnitPlayFiring}}]]

Latest revision as of 10:44, 29 December 2022

Hover & click on the images for description

Description

Description:
Plays back input weapon fire data on input unit.
Execution:
spawn
Groups:
Scenes

Syntax

Syntax:
[unit, data, stateIgnore] spawn BIS_fnc_unitPlayFiring
Parameters:
unit: Object - unit to play weapon fire data on
data: Array - firing data to use BIS_fnc_unitCaptureFiring
stateIgnore: Boolean - (Optional, default false) whether to ignore if the Unit is dead and/or cannot move
Return Value:
Script Handle

Examples

Example 1:
private _capturedFireData = [[2.135, "GAU8", "<NULL-object>"]]; [BIS_Vehicle, _capturedData, true] spawn BIS_fnc_unitPlayFiring;

Additional Information

See also:
BIS_fnc_unitCaptureFiring BIS_fnc_unitCaptureSimple BIS_fnc_unitPlaySimple BIS_fnc_unitCapture BIS_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