BIS fnc helicopterDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Some wiki formatting)
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= tkoh
____________________________________________________________________________________________
|version1= 1.00


| tkoh |= Game name
|game2= arma3
|version2= 0.50


|1.00|= Game version
|gr1= Helicopters
____________________________________________________________________________________________


| <pre>/*
|descr= Handling EH-based helicopter damage, event handler in question being {{sic|[[Arma 3: Event Handlers#Dammaged|Da''mm''aged]]}}.


Description:
{{Feature|informative|
Handling EH-based helicopter damage
Executed script is:
<sqf>helicopter execVM "hsim\air_h\data\scripts\main_rotor_destruction.sqf";</sqf>


Parameter(s):
helicopter rotor status can be found ''via'' variable '''HSim_mainRotorDestroyed''':
_this: EH arguments (Array)
<sqf>_isRotorDestroyed = helicopter getVariable ["HSim_mainRotorDestroyed", false];</sqf>
}}


Returns:
|s1= [helicopter, selection, damage] call [[BIS_fnc_helicopterDamage]]
Bool
*/


//TODO: use new EH which returns actualt hitpoint names?
|p1= helicopter: [[Object]]
</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"


|p1= |= Parameter 1
|p3= damage: [[Number]] - ''selection'''s damage. Will only trigger effects if ''damage'' &gt; 0.999


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


|x1= <code></code> |=
|x1= <sqf>myHelicopter addEventHandler ["Dammaged", { _this call BIS_fnc_helicopterDamage; }];</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso=
}}
}}
<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: Helicopters|{{uc:helicopterDamage}}]]
[[Category:Functions|{{uc:helicopterDamage}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:helicopterDamage}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:helicopterDamage}}]]

Latest revision as of 11:21, 13 July 2022

Hover & click on the images for description

Description

Description:
Handling EH-based helicopter damage, event handler in question being Dammagedsic.
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:
Helicopters

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