Some more very useful Arma 3 scripting commands.

There are many very useful scripting commands for Arma 3 that are less known. The one below will return the number of days the player has played Arma 3 in total. _daysplayed = getStatValue "GamePlayedDays";_daysplayed = getStatValue "GamePlayedDays"; Use this code to determine if a player has finished the Bootcamp campaign before jumping into multiplayer. … Read more

Some more very useful Linux tips for scripting fans.

How to get the total size of a folder using Linux scripting. ┌──[[email protected]]─[~/Documents] └──╼ ╼ $ du -ack -BM | sort -nr | head -n 1 | awk ‘{print $1}’ 30255M┌──[[email protected]]─[~/Documents] └──╼ ╼ $ du -ack -BM | sort -nr | head -n 1 | awk ‘{print $1}’ 30255M This shows the total size of … Read more

Ending a mission properly using scripting in Arma 3.

This very useful code will end a mission when three triggers have been activated and there are no enemies in the trigger area. adt = createTrigger ["EmptyDetector", Loc]; adt setTriggerArea [1800, 1800, 0, false]; adt setTriggerActivation ["EAST", "NOT PRESENT", false]; adt setTriggerStatements ["this","",""];   waitUntil { sleep 1; ((triggeractivated adt) && (triggeractivated tower2) && (triggeractivated … Read more

Very useful Arma 3 scripting samples for making a nice mission easily.

To set the arsenal action on all crates in your base, use this code. This will give the Arsenal action to the Cargo Net Box item. Put this in the initPlayerLocal.sqf file. { [_x, "Open the Arsenal", "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa", "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa", "(_this distance _target < 6) && (isNull (findDisplay 162))", "isNull (findDisplay 162)", {}, BIS_holdActionProgress, {["Open",true] call … Read more

Start a mortar strike on an enemy position in Arma 3.

This simple code will start a mortar strike on an enemy position when a vehicle is destroyed. car1 addEventHandler [ ‘Killed’, { _bombardment = [BIS_Mortar,getMarkerPos "mk2","8Rnd_82mm_Mo_shells",100,24,10] execVM "a3\missions_f_exp\showcases\showcase_endgame.tanoa\scripts\firesupport.sqf"; }];car1 addEventHandler [ ‘Killed’, { _bombardment = [BIS_Mortar,getMarkerPos "mk2","8Rnd_82mm_Mo_shells",100,24,10] execVM "a3\missions_f_exp\showcases\showcase_endgame.tanoa\scripts\firesupport.sqf"; }]; Name the mortar BIS_Mortar, then place a marker on the location to be shelled, named … Read more

Arma 3 scripting tricks and samples for making missions.

Detect if a player has the APEX DLC. if (395180 in getDLCs 1) then { (_this select 0) ctrlsettext ‘\a3\Ui_f\Data\Logos\arma3apex_white_ca.paa’; };if (395180 in getDLCs 1) then { (_this select 0) ctrlsettext ‘\a3\Ui_f\Data\Logos\arma3apex_white_ca.paa’; }; Remove all NVG goggles and weapons from enemies. { if (side _x == east) then { _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; … Read more

Very useful Arma 3 code for mods and missions.

A code sample that creates a weapon box with some ammo. Just change the class names to add a weapon of your choice to this box. class cfgVehicles { class Thing; class ThingX; class ReammoBox; class Strategic; class EAST_Box_Base; class NATO_Box_Base; class Railgun_Transport_Box: EAST_Box_Base { scope = 2; vehicleClass = "Ammo"; displayName = "Railgun Box"; … Read more

Even more very useful Arma 3 script samples.

Some very good Arma 3 scripting samples Put this code into the init of a crate to create an Arsenal crate. this addaction ["Open Virtual Arsenal", { ["Open",true] call BIS_fnc_arsenal; }];this addaction ["Open Virtual Arsenal", { ["Open",true] call BIS_fnc_arsenal; }]; This code in the initPlayerLocal.sqf and onPlayerRespawn.sqf files will remove stamina and weapon sway. player … Read more