BIS fnc diagBulletCam: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Examples)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 8: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Add a "bullet camera" to shots fired by the specified unit. |= Description
 
Description:
Every time a given unit fires, bullet cam is created.
 
Parameter(s):
0: OBJECT - unit on which firing is tracked
 
Returns:
BOOL
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_diagBulletCam]]; --> |= Syntax
| unit call [[BIS_fnc_diagBulletCam]] |= Syntax


|p1= |= Parameter 1
|p1= unit: [[Object]] - the shooting unit. Can be a vehicle. |= Parameter 1


| |= Return value
| [[Boolean]] - [[true]] when done |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>player spawn [[BIS_fnc_diagBulletCam]];</code> |=  
|x1= <code>[[player]] [[call]] [[BIS_fnc_diagBulletCam]];</code> |= Example 1


|x2= Add and remove bullet cam using this method
|x2= <code>{{codecomment|// bullet camera will be removed after 10s}}
<code>_unit = [[player]];
_unit = [[player]];
_unit [[spawn]] [[BIS_fnc_diagBulletCam]];
_unit [[call]] [[BIS_fnc_diagBulletCam]];
_EhIndex = _unit [[getVariable]] "bis_fnc_diagBulletCam_fired";
_ehIndex = _unit [[getVariable]] "bis_fnc_diagBulletCam_fired";
_unit [[removeEventHandler]] ["[[Arma_3:_Event_Handlers#Fired|fired]]",_EhIndex];</code> |=  
[[sleep]] 10;
_unit [[removeEventHandler]] ["[[Arma_3:_Event_Handlers#Fired|fired]]", _ehIndex];</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[:Category:Event_Handlers|Event Handlers]], [[:Category:Command_Group:_Camera_Control|Camera Control Commands]] |= See also
 
}}
}}



Revision as of 12:32, 3 May 2018

Hover & click on the images for description

Description

Description:
Add a "bullet camera" to shots fired by the specified unit.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
unit call BIS_fnc_diagBulletCam
Parameters:
unit: Object - the shooting unit. Can be a vehicle.
Return Value:
Boolean - true when done

Examples

Example 1:
player call BIS_fnc_diagBulletCam;
Example 2:
// bullet camera will be removed after 10s _unit = player; _unit call BIS_fnc_diagBulletCam; _ehIndex = _unit getVariable "bis_fnc_diagBulletCam_fired"; sleep 10; _unit removeEventHandler ["fired", _ehIndex];

Additional Information

See also:
Event HandlersCamera Control Commands

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