How to sign an Arma 3 mod with BI utilities and make it ready for the Steam Workshop.
How to use BI utilities to sign a PBO properly. This is very useful.
How to use BI utilities to sign a PBO properly. This is very useful.
Some more very useful Arma 3 scripting samples.
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
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
There is a nice Arma 3 command that will allow a mission designer to have a nice ambient flyby of a jet plane or a helicopter. This would be very nice for a mission, and would add some atmosphere. This example has a jet flying from one location to another. When it reaches the destination, … Read more
Spawning random enemies can be troublesome in Arma 3. But this makes it easier. This will spawn the enemies in the middle of the map and this will find a safe location to spawn them. Fixed code for 2022. Loc = [worldSize / 2, worldsize / 2, 0]; SafePos2 = [Loc, 95, 600, 20, … Read more
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
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
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
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
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
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
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
Arma 3 on Linux is now at version 1.76, this is on parity with the Windows build and would allow playing on multiplayer servers on a Linux box. I have found that with the 3.40 Nvidia drivers, I get less FPS than with Windows, but it does actually run quite well. This is until the … Read more
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
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
Very useful Arma 3 code samples to make better missions.
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
This simple code for Arma 3 will spawn a randomly placed HQ building within the area of the mkr1 marker. This is a 4000×4000 marker placed on the map. This gets a random safe area and places the building within the area of this marker. _mrk = "mkr1"; _area = markerSize _mrk; _nul = _area … Read more
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