BIN fnc empVehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:Functions\|\{\{uc:[a-z A-Z]*\}\}\]\]" to "")
(Page filling)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


|game1= arma3  
|game1= arma3
 
|version1= 1.94
|version1= 1.94


|gr1= Contact  
|gr1= Contact  


|descr= <pre>/*
|descr= Sets EMP parameters to a vehicle. Destroys lights and optionally prevents vehicle from starting
 
Description: Sets EMP parameters to a vehicle. Destroys lights and optionally prevents vehicle from starting
 
Parameter(s):
0: OBJECT - Vehicle that will get destroyed electronics
1: (Optional): BOOL - Sets engine destroyed - true = engine destroyed, false = engine operating (default: true)
2: (Optional): BOOL - Handle AI in EMP vehicle - true = AI will exit vehicle and not enter new vehicles, false = AI will remain in vehicle (default: true)


Note that the player has to be defined as bin_player for the voice lines to be spoken
{{Feature|informative|The player has to be defined as <sqf inline>BIN_player</sqf> for the voice lines to be spoken.}}
{{Feature|arma3contact}}


Examples:
|s1= [obj, destroyEngine, aiExit] call [[BIN_fnc_empVehicle]]


[bin_vehicle,true,true] call bin_fnc_empVehicle; //Destroys lights and prevents vehicle from starting, AI will exit vehicle after it has stopped
|p1= obj: [[Object]] - the vehicle


[bin_vehicle,false,false] call bin_fnc_empVehicle; //Destroys lights, but engine can still start and vehicle can be driven, AI will remain in vehicle
|p2= destroyEngine: [[Boolean]] - (Optional, default [[true]]) [[true]] to destroys the engine, [[false]] to have it working
*/


{{placeholder}} {{Feature|arma3contact}}
|p3= aiExit: [[Boolean]] - (Optional, default [[true]]) AI behaviour in vehicle; [[true]] to make them exit the vehicle, [[false]] to remain in it


|s1= <!-- [] call [[BIN_fnc_empVehicle]]; -->
|r1=


|p1=  
|x1= <sqf>[_enemyVehicle, true, true] call BIN_fnc_empVehicle;</sqf>


|x1=
|seealso= [[setDamage]] [[setHitPointDamage]]
}}
}}

Latest revision as of 00:17, 21 November 2023

Hover & click on the images for description

Description

Description:
Sets EMP parameters to a vehicle. Destroys lights and optionally prevents vehicle from starting
The player has to be defined as BIN_player for the voice lines to be spoken.
enoch icon ca.png
This content is exclusive to the Arma 3 Contact Expansion.
Execution:
call
Groups:
Contact

Syntax

Syntax:
[obj, destroyEngine, aiExit] call BIN_fnc_empVehicle
Parameters:
obj: Object - the vehicle
destroyEngine: Boolean - (Optional, default true) true to destroys the engine, false to have it working
aiExit: Boolean - (Optional, default true) AI behaviour in vehicle; true to make them exit the vehicle, false to remain in it
Return Value:
Return value needed

Examples

Example 1:
[_enemyVehicle, true, true] call BIN_fnc_empVehicle;

Additional Information

See also:
setDamage setHitPointDamage

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