How to get RHS units to garrison buildings in Arma 3.

Posted: January 19, 2016. At: 10:26 PM. This was 2 years ago. Post ID: 8678

The simple CBA_fnc_taskDefend function will enable RHS Escalation units to garrison buildings. The Community Base Addons mod is required for this function.

Just place this code in the init of each group leader.

[this] call CBA_fnc_taskDefend;

This is another example. The troops will head towards the marker named ‘hq’ and occupy buildings around it. If you place the troops a fair way away from the area, they will run towards it.

[this, hq, 300, 3, true] call CBA_fnc_taskDefend;

Now they will run towards buildings and garrison them. To create a realistic random patrol around an AO, put this code into the group leaders init.

[group this, getPos this, 400] call bis_fnc_taskPatrol;

This will create a random 400 meter patrol around an AO.

Add this code to the initServer.sqf to spawn a dust storm for all players in a multiplayer mission.

[player, -1, 0.8, true] call BIS_fnc_sandstorm;

Add this code to the initPlayerLocal.sqf and the onPlayerRespawn.sqf file to remove stamina and make the weapon sway less annoying.

player setCustomAimCoef 0.34;
player setUnitRecoilCoefficient 0.50;
player enablestamina false;
player setUnitTrait ["camouflageCoef",0.8];

This code added to the initServer.sqf will spawn a minefield around a radio tower or any other object you wish.

// Spawn a random minefield around the radio tower.
// *********************************************************************
 
_initialPos = getPos tower1; // Pos of tower.
for "_count" from 1 to 30 do {
	_minePos = [
		(_initialPos select 0) + ((random 80) - 40),
		(_initialPos select 1) + ((random 80) - 40)
	];
	_minen = createMine [
		"APERSBoundingMine",
		_minePos,
		[],
		0
	];
};
 
// End mine code.
// *********************************************************************

No comments have been made. Use this form to start the conversation :)

Leave a Reply