Addon: common - Nomas-X/AET_AUX GitHub Wiki

Description

This addon contains most functions or features that do not need their own addon. We will go over its functionality, and how it is utilized.

GL Smoke Anti-Bounce

This feature makes grenade launched smoke shells less bouncy, to enable it or disable it simply navigate to the addon options as shown in the picture below:

Feature's Addon Options

GL Smoke Anti-Bounce

Comparing addon options

This feature allows the logged in admin or anyone based on the setting to run a comparison between the cba_settings.sqf file present in the mission pbo and the master settings present in the addon to detect if the mission maker has made any changes as shown in the pictures below. The cba_settings.sqf file must indicate its end by a comment // END OF AET FILE. This is done to allow the use of #include below that comment for the AET_settings.sqf from our standardized files.

Feature's Addon Options

Compare Addon Options

Compare Addon Options Request

Compare Addon Options Request

Compare Addon Options Result

Compare Addon Options Result

Dynamic Groups

This feature allows the enabling and disabling of the Arma 3 dynamic groups menu, also known as the U menu or squad menu.

Feature's Addon Option

Dynamic Groups

Squad Menu

Squad Menu

Disabling AI by layer

Description

The function AET_common_fnc_disableLayerAI is used to disable certain AI behaviors for all units in a layer. The function has a similar effect to the disableAI command, the key differences being is that the function executes the command on every unit in the layer on all connected clients in case the unit changes locality which can happen when headless clients are in use. Ensure that the function is called on the server.

Syntax

[layerName, AIfeature] AET_common_fnc_disableLayerAI

Parameters

  • layerName: String - Exact name of the layer that contains the AI units.
  • AIfeature: String - AI feature to disable.

Return

Nothing

Examples

["Ambush Layer", "PATH"] call AET_common_fnc_disableAILayer;
["Layer 1", "TARGET"] call AET_common_fnc_disableLayerAI;

Enabling AI by layer

Description

The function AET_common_fnc_enableLayerAI is used to enable certain AI behaviors for all units in a layer. The function has a similar effect to the enableAI command, the key differences being is that the function executes the command on every unit in the layer on all connected clients in case the unit changes locality which can happen when headless clients are in use. Ensure that the function is called on the server.

Syntax

[layerName, AIfeature] AET_common_fnc_enableLayerAI

Parameters

  • layerName: String - Exact name of the layer that contains the AI units.
  • AIfeature: String - AI feature to enable.

Return

Nothing

Examples

["Ambush Layer", "PATH"] call AET_common_fnc_enableAILayer;
["Layer 1", "TARGET"] call AET_common_fnc_enableLayerAI;

Locking AI seats

Description

The function AET_common_fnc_lockAISeats is used to change the lock state of seats occupied by AI in a given vehicle. The function has a similar effect to the lockDriver, lockCargo, lockTurret commands.

Syntax

[vehicle, lockState] AET_common_fnc_lockAISeats

Parameters

  • vehicle: Object - The vehicle that this function will be applied to.
  • lockState: Boolean - The lock state to be applied. [Optional - default: true]

Return

Nothing

Examples

[AET_HELI_1, true] call AET_common_fnc_lockAISeats;
[AET_MBT_1, false] call AET_common_fnc_lockAISeats;

Guided Airstrike

Description

The function HR_fnc_LGAirstrike is used to airstrike a given list of targets, dropping one laser guided bomb of the chosen type at each of them.

Syntax

[targets, bombType, side, trackTarget, egress, planeType] HR_fnc_LGAirstrike

Parameters

  • targets: Array - Objects / Positions that the airstrike is called on.
  • bombType: String - Bomb type ("HE", "Cluster", "AT"). [Optional - default: "HE"]
  • side: Side - Side of the spawned airstrike plane.[Optional - default: west]
  • trackTarget: Boolean - Should. the airstrike plane track target? (first target passed) [Optional - default: false]
  • egress: Number- Egress angle of the airstrike plane. [Optional - default: random 360]
  • planeType: String - Class name of the airstrike plane to be spawned. [Optional - default: "B_Plane_CAS_01_dynamicLoadout_F"]

Return

Nothing

Examples

[_obj1, _obj2, [0, 0, 10](/Nomas-X/AET_AUX/wiki/_obj1,-_obj2,-[0,-0,-10), "HE", independent, false, 0] spawn HR_fnc_LGAirstrike;
[_obj1, _obj2, [0, 0, 10](/Nomas-X/AET_AUX/wiki/_obj1,-_obj2,-[0,-0,-10), "HE", independent, false, 0, "B_Plane_CAS_01_dynamicLoadout_F"] spawn HR_fnc_LGAirstrike;

Setting player faces

Description

The function AET_common_fnc_setFaces is used to force player faces to one of the provided options. If the player profile face is not in the list of provided faces then a face from the provided list will be picked at random and assigned to the player. This face will remain even after a respawn. The function has a similar effect to the setFace commands. Ensure that the function is called in the onPlayerRespawn.sqf file unless you have a different special use for it and know what you're doing.

Syntax

[unit, faces] AET_common_fnc_setFaces

Parameters

  • unit: Object - The unit that this function will be applied to.
  • faces: Array - Array of the class names of the faces that the function will apply.
    • 0. String - Class names of the faces that the function will apply.

Return

Nothing

Examples

[player, ["PersianHead_A3_04_a", "PersianHead_A3_04_l", "PersianHead_A3_04_sa"]] call AET_common_fnc_setFaces;
// Apply different faces to different players
private _listOfPlayers_1 = ["P_1", "P_2", "P_3"] call HR_fnc_ValidateObjects;

if (player in _listOfPlayers_1) then {
	private _listOfFaces_1 = ["PersianHead_A3_04_a", "PersianHead_A3_04_l", "PersianHead_A3_04_sa"];
	[player, _listOfFaces_1 ] call AET_common_fnc_setFaces;
};

private _listOfPlayers_2 = ["P_2", "P_3", "P_4"] call HR_fnc_ValidateObjects;

if (player in _listOfPlayers_2) then {
	private _listOfFaces_2 = [ "PersianHead_A3_04_sa"];
	[player, _listOfFaces_2] call AET_common_fnc_setFaces;
};

Validating Objects

Description

The function HR_fnc_validateObjects is used to validate if a given object exists to avoid getting a script error. The function is rather simple and it is meant to be used in combination with other functions simply to avoid the players getting script errors.

Syntax

[objects] HR_fnc_validateObjects

Parameters

  • objects: Array- List of objects to be validated.
    • 0. String - Variable name of the object

Return

Array - result of the validation, if an object is not found then it will be replaced with ObjNull.

Examples

private _listOfPlayers = ["P_1", "P_2"] call HR_fnc_validateObjects;
// Example where it is used with another function
private _listOfPlayers = ["P_2", "P_3", "P_4"] call HR_fnc_ValidateObjects;

if (player in _listOfPlayers) then {
	// ...code...
};

AET Banner

This addon also contains a banner of the AET logo in .paa format. The dimensions of the banner are 2048x1024. The banner's file path is "\z\aet\addons\common\images\Antistasi_event_team_2048x1024.paa". This banner is mainly for use as the default picture in the standardized files.