Save player`s loadout after closing arsenal in Arma 3.

To save the player`s loadout after they close the arsenal in Arma 3, put this code in the initPlayerLocal.sqf file. This code will save the player loadout after the arsenal is closed. [missionnamespace,"arsenalClosed", { [player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory; titletext ["Arsenal loadout saved.", "PLAIN DOWN"]; }] call bis_fnc_addScriptedEventhandler;[missionnamespace,"arsenalClosed", { [player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory; titletext … Read more

How to script an artillery piece to fire on a certain position in Arma 3.

To make an artillery piece to fire on a certain spot in the editor, firstly, place the Scorcher unit, name it “arty1” and put this code in the init. this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}] This will give it unlimited ammo. Then place a car wreck, … 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 script samples and functions to make a great mission.

To play music while players enjoy your mission, use this simple but effective function. 6 fademusic 0.1;   [] call BIS_fnc_jukebox;6 fademusic 0.1; [] call BIS_fnc_jukebox; This plays ambient music, randomly selecting tracks to play. Put this in the initPlayerLocal.sqf file. Put this code in the init of a vehicle at the base to have … 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

Arma 3 script samples for creating a scripted mission.

This simple script sample will spawn 3 enemy groups around a central point in safe places. Fixed version, I accidentally posted the wrong code, this will work fine. I tested this in a mission and it works now. _Center = _randPos2; _Circle1 = [_Center, 150, 150, 0, 0, 20, 0] call BIS_fnc_findSafePos; _Circle2 = [_Center, … Read more

Very interesting and useful Arma 3 scripting commands for multiplayer missions.

Arma 3 scripting samples for creating MP missions This code sample inserted into the initServer.sqf will protect buildings 900m around your base from destruction by retards with a grudge against your server. { _x allowdamage false; } foreach (nearestTerrainObjects [crat99,["house"],900]);{ _x allowdamage false; } foreach (nearestTerrainObjects [crat99,["house"],900]); Name an object crat99 and then place this … Read more

Code for Arma 3 to spawn you in a random jet with infinite ammo and refilling fuel.

This code will spawn you in a jet flying over the AO, this will pick a random jet and spawn you a long way up, so you will not crash before orienting yourself. Put this script in initPlayerLocal.sqf. private "_jet"; _jet = createVehicle [selectRandom ["O_Plane_Fighter_02_Stealth_F", "I_Plane_Fighter_04_F", "B_Plane_Fighter_01_Stealth_F", "O_Plane_CAS_02_dynamicLoadout_F"], getArray (configFile >> "CfgWorlds" >> worldName >> … 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

More very useful Arma 3 scripting commands.

Some very cool Arma 3 SQF scripting samples Shoot a vehicle or soldier 50,000 feet into the sky. cursorTarget setVelocity [0,0,1000]; hint format["%1 Is flying to space!",name cursorTarget];cursorTarget setVelocity [0,0,1000]; hint format["%1 Is flying to space!",name cursorTarget]; Spawn an AAF support crate in random houses around the HQ. _houseList = getPos _cargo nearObjects ["House",500]; { … Read more

Some more Arma 3 script samples.

Very useful Arma 3 scripting samples This scripting sample will remove the solar panels and doors from the Orange DLC tents and make them look like a good old fashioned MASH tent. med1 animateSource ["MedSign_Hide",1,true]; med1 animateSource ["Door_Hide",1,true]; med1 setObjectTextureGlobal [0,"\A3\Structures_F_Orange\Humanitarian\Camps\Data\MedicalTent_01_tropic_F_CO.paa"];med1 animateSource ["MedSign_Hide",1,true]; med1 animateSource ["Door_Hide",1,true]; med1 setObjectTextureGlobal [0,"\A3\Structures_F_Orange\Humanitarian\Camps\Data\MedicalTent_01_tropic_F_CO.paa"]; Add this code to your initServer.sqf … Read more

Easily spawn an enemy jet to patrol an AO in Arma 3 with a script.

This simple script will spawn a jet to patrol an AO and attack any enemy vehicle or helicopter it sees. This is improved code that has a proper patrol radius and is better than the jet patrolling in too small a radius. // Spawn a CAS jet to patrol the AO.   #define PLANE_TYPE "rhs_l159_CDF","rhs_l39_cdf","rhs_mig29s_vmf","RHS_Su25SM_vvsc","RHS_T50_vvs_generic","RHS_T50_vvs_generic_ext","RHS_T50_vvs_blueonblue" … Read more

Arma 3 on Linux, a possibility?

The Arma 3 server product is available for Linux machines, but what about the main client product? This is also available for Linux. I added the multiverse repository. jason$ sudo add-apt-repository multiverse && sudo apt updatejason$ sudo add-apt-repository multiverse && sudo apt update Then I added 32-bit support. jason$ sudo dpkg –add-architecture i386jason$ sudo dpkg … Read more