Skip to content

Instantly share code, notes, and snippets.

@mr-bo-jangles
Created October 24, 2017 19:28
Show Gist options
  • Save mr-bo-jangles/00ffe929985ac746dd9b8955f6b3badb to your computer and use it in GitHub Desktop.
Save mr-bo-jangles/00ffe929985ac746dd9b8955f6b3badb to your computer and use it in GitHub Desktop.
class CfgVehicles {
class Module_F;
class vComAIZeusModuleBase: Module_F {
category = "VcomAI Zeus Helper";
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
scope = 1;
scopeCurator = 2;
curatorCanAttach = 1;
icon = "a3\ui_f\data\IGUI\Cfg\Actions\repair_ca.paa";
};
class vcomAIOn: vComAIZeusModuleBase {
function = "\gigga_vcomZeus\gigga_zeus\functions\vcomUnitOn";
displayName = "Turn Vcom On (unit)"
}
class vcomAIOff: vComAIZeusModuleBase {
function = "\gigga_vcomZeus\gigga_zeus\functions\vcomUnitOff";
displayName = "Turn Vcom Off (unit)"
}
};
class CfgPatches {
class ADDON {
name = "vcomaihelper";
units[] = {
"vcomAIOn",
"vcomAIOff"
};
author = "Giggaflop";
authors[] = {"Giggaflop", "Help from ACE Team"};
};
};
#include "CfgVehicles.hpp"
vcomUnitOff = {
params ["_logic"];
if (!local _logic) exitWith {};
private _unit = effectiveCommander (attachedTo _logic);
deleteVehicle _logic;
if (isNull _unit) exitWith {};
if (!alive _unit) exitWith {};
if (isPlayer _unit) exitWith {};
if (!(_unit isKindOf "CaManBase")) exitWith {};
_unit setVariable ["VCOM_NOAI", false];
};
vcomUnitOn = {
params ["_logic"];
if (!local _logic) exitWith {};
private _unit = effectiveCommander (attachedTo _logic);
deleteVehicle _logic;
if (isNull _unit) exitWith {};
if (!alive _unit) exitWith {};
if (isPlayer _unit) exitWith {};
if (!(_unit isKindOf "CaManBase")) exitWith {};
_unit setVariable ["VCOM_NOAI", true];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment