BIS fnc helicopterDamage: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| tkoh | | tkoh | ||
|1.00 | |1.00 | ||
|gr1 = Helicopters | |gr1 = Helicopters | ||
| 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 12: | Line 12: | ||
<code>helicopter [[execVM]] '''"hsim\air_h\data\scripts\main_rotor_destruction.sqf"''';</code> | <code>helicopter [[execVM]] '''"hsim\air_h\data\scripts\main_rotor_destruction.sqf"''';</code> | ||
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> | <code>_isRotorDestroyed {{=}} helicopter [[getVariable]] ["HSim_mainRotorDestroyed", [[false]]];</code> | ||
| [helicopter, selection, damage] call [[BIS_fnc_helicopterDamage]] | | [helicopter, selection, damage] call [[BIS_fnc_helicopterDamage]] | ||
|p1= helicopter: [[Object]] | |p1= helicopter: [[Object]] | ||
|p2= selection: [[String]] - name of the helicopter selection receiving damage. Must be "main rotor" | |p2= selection: [[String]] - name of the helicopter selection receiving damage. Must be "main rotor" | ||
|p3= damage: [[Number]] - ''selection'''s damage. Will only trigger effects if ''damage'' > 0.999 | |p3= damage: [[Number]] - ''selection'''s damage. Will only trigger effects if ''damage'' > 0.999 | ||
| [[Boolean]] - [[true]] when done | | [[Boolean]] - [[true]] when done | ||
|x1= <code>myHelicopter [[addEventHandler]] ["Dammaged", { [[_this]] [[call]] [[BIS_fnc_helicopterDamage]]; }];</code> | |x1= <code>myHelicopter [[addEventHandler]] ["Dammaged", { [[_this]] [[call]] [[BIS_fnc_helicopterDamage]]; }];</code> | ||
| | | | ||
}} | }} | ||
Revision as of 23:10, 17 January 2021
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