BIS fnc helicopterDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Helicopters(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Function|Comments=
{{Function|Comments=
____________________________________________________________________________________________


| tkoh |Game name=
| tkoh |Game name=
Line 7: Line 6:


|gr1 = Helicopters |GROUP1=
|gr1 = Helicopters |GROUP1=
____________________________________________________________________________________________


| Handling EH-based helicopter damage, event handler in question being [[Arma_3:_Event_Handlers#Dammaged|Da''mm''aged]]{{sic}}.  
| Handling EH-based helicopter damage, event handler in question being [[Arma_3:_Event_Handlers#Dammaged|Da''mm''aged]]{{sic}}.  
Line 15: Line 13:
helicopter rotor status can be found ''via'' variable '''HSim_mainRotorDestroyed''':
helicopter rotor status can be found ''via'' variable '''HSim_mainRotorDestroyed''':
<code>_isRotorDestroyed {{=}} helicopter [[getVariable]] ["HSim_mainRotorDestroyed", [[false]]];</code> |Description=
<code>_isRotorDestroyed {{=}} helicopter [[getVariable]] ["HSim_mainRotorDestroyed", [[false]]];</code> |Description=
____________________________________________________________________________________________


| [helicopter, selection, damage] call [[BIS_fnc_helicopterDamage]] |Syntax=
| [helicopter, selection, damage] call [[BIS_fnc_helicopterDamage]] |Syntax=
Line 26: Line 23:


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


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


| |See also=
| |See also=

Revision as of 23:06, 16 January 2021

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:
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

Notes

Bottom Section