-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added way to immobilise vehicle by disabling the drivers AI
- Loading branch information
Showing
5 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#define MAJOR 2 | ||
#define MINOR 1 | ||
#define MINOR 2 | ||
#define PATCHLVL 0 | ||
#define BUILD 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: cineafx | ||
* Disable the ai of a drivers of vehicles. | ||
* | ||
* Arguments: | ||
* 0: Vehicles to clear the inventory of. <Array> (default: []) | ||
* | ||
* Return Value: | ||
* nothing | ||
* | ||
* Example: | ||
* [_units] call CINE_addizeus_vehicles_fnc_immobiliseVehicle | ||
* | ||
* Public: [No] | ||
*/ | ||
|
||
params [["_units", []]]; | ||
|
||
TRACE_1("params",_units); | ||
|
||
{ | ||
if (_x isKindOf "AllVehicles") then { | ||
if !(isPlayer _x) then { | ||
(driver _x) disableAI "all"; | ||
//(driver _x) setBehaviour "CARELESS"; | ||
} | ||
} | ||
} forEach _units; | ||
|
||
true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: cineafx | ||
* Adds a zeus module which disables the ai of a driver. | ||
* Automatically detects Ares Achilles and ZEN. | ||
* | ||
* Arguments: | ||
* none | ||
* | ||
* Return Value: | ||
* nothing | ||
* | ||
* Example: | ||
* [] call CINE_addizeus_vehicles_fnc_moduleImmobiliseVehicle | ||
* | ||
* Public: [No] | ||
*/ | ||
|
||
if (isClass (configFile >> 'cfgPatches' >> "achilles_modules_f_achilles")) then { | ||
[ | ||
"CINE vehicles", | ||
"Immobilise vehicle (disable Driver AI)", | ||
{ | ||
params ["_pos", "_attachedObject"]; | ||
|
||
[_attachedObject, DFUNC(immobiliseVehicle), "Immobilised vehicle.",[], "Vehicles"] call EFUNC(common,moduleHandler); | ||
} | ||
] call Ares_fnc_RegisterCustomModule; | ||
}; | ||
|
||
if (isClass (configFile >> 'cfgPatches' >> "zen_modules")) then { | ||
[ | ||
"CINE vehicles", | ||
"Immobilise vehicle (disable Driver AI)", | ||
{ | ||
params ["_pos", "_attachedObject"]; | ||
|
||
[_attachedObject, DFUNC(immobiliseVehicle), "Immobilised vehicle.",[], "Vehicles"] call EFUNC(common,moduleHandler); | ||
}, | ||
"\a3\missions_f_oldman\Data\img\HoldActions\holdAction_follow_stop_ca.paa" | ||
] call zen_custom_modules_fnc_register; | ||
}; | ||
|
||
true; |