Difference between revisions of "BIS fnc helicopterDamage"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
 
+
{{Function|Comments=
{{Function|= Comments
 
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| tkoh |= Game name
+
| tkoh |Game name=
  
|1.00|= Game version
+
|1.00|Game version=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| <pre>/*
+
| Handling EH-based helicopter damage, event handler in question being [[Arma_3:_Event_Handlers#Dammaged|Da''mm''aged]]{{sic}}.
 
+
<syntaxhighlight lang="cpp">params ["_helicopter", "_selection", "_damage"];</syntaxhighlight>
Description:
+
Executed script is:
Handling EH-based helicopter damage
+
<code>helicopter [[execVM]] '''"hsim\air_h\data\scripts\main_rotor_destruction.sqf"''';</code>
 
+
helicopter rotor status can be found ''via'' variable '''HSim_mainRotorDestroyed''':
Parameter(s):
+
<code>_isRotorDestroyed {{=}} helicopter [[getVariable]] ["HSim_mainRotorDestroyed", [[false]]];</code> |Description=
_this: EH arguments (Array)
+
____________________________________________________________________________________________
  
Returns:
+
| [helicopter, selection, damage] call [[BIS_fnc_helicopterDamage]] |Syntax=
Bool
 
*/
 
  
//TODO: use new EH which returns actualt hitpoint names?
+
|p1= helicopter: [[Object]] |Parameter 1=
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
 
____________________________________________________________________________________________
 
  
| <!-- [] call [[BIS_fnc_helicopterDamage]]; --> |= Syntax
+
|p2= selection: [[String]] - name of the helicopter selection receiving damage. Must be "main rotor" |Parameter 2=
  
|p1= |= Parameter 1
+
|p3= damage: [[Number]] - ''selection'''s damage. Will only trigger effects if ''damage'' &gt; 0.999 |Parameter 3=
  
| |= Return value
+
| [[Boolean]] - [[true]] when done |Return value=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= <code></code> |=  
+
|x1= <code>myHelicopter [[addEventHandler]] ["Dammaged", { [[_this]] [[call]] [[BIS_fnc_helicopterDamage]]; }];</code> |Example 1=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| |= See also
+
| |See also=
 
 
 
}}
 
}}
  

Revision as of 13:10, 28 May 2018

Hover & click on the images for description

Description

Description:
Handling EH-based helicopter damage, event handler in question being Dammagedsic.
params ["_helicopter", "_selection", "_damage"];

Executed script is: helicopter execVM "hsim\air_h\data\scripts\main_rotor_destruction.sqf"; helicopter rotor status can be found via variable HSim_mainRotorDestroyed:

_isRotorDestroyed = helicopter getVariable ["HSim_mainRotorDestroyed", false];
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[helicopter, selection, damage] call BIS_fnc_helicopterDamage
Parameters:
helicopter: Object
selection: String - name of the helicopter selection receiving damage. Must be "main rotor"
damage: Number - selection's damage. Will only trigger effects if damage > 0.999
Return Value:
Boolean - true when done

Examples

Example 1:
myHelicopter addEventHandler ["Dammaged", { _this call BIS_fnc_helicopterDamage; }];

Additional Information

See also:
See also needed

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