BIS fnc unitPlayFiring: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (pf)
Line 1: Line 1:
 
{{Function|Comments=
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2oa |= Game name
| arma2oa |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| Plays back input weapon fire data on input unit. |Description=
/*
____________________________________________________________________________________________
File: fn_UnitPlayFiring.sqf


Description:
| [unit, data, stateIgnore] spawn [[BIS_fnc_UnitPlayFiring]] |Syntax=
Plays back input weapon fire data on input unit.


Parameters:
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 |Parameter 1=
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]]|Parameter 2=
// 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 |Parameter 3=
____________________________________________________________________________________________


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


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


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


|x1= <code></code> |=  
|x1= <code>_capturedFireData = [[2.135,"GAU8","<NULL-object>"]];
[ BIS_Vehicle, _capturedData, [[true ]] ] [[spawn]] [[BIS_fnc_UnitPlayFiring]];</code>|Example 1=
____________________________________________________________________________________________
____________________________________________________________________________________________


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



Revision as of 15:02, 11 June 2018

Hover & click on the images for description

Description

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

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 - Script handle

Examples

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

Additional Information

See also:
BIS_fnc_UnitCaptureFiringBIS_fnc_UnitCaptureSimpleBIS_fnc_UnitPlaySimpleBIS_fnc_UnitCaptureBIS_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