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

How to spawn fire on top of a smoke stack in Arma 3 and other useful tips for mission making.

Spawn fire in air in Arma 3 Put this code in your initPlayerLocal.sqf and this will spawn a fire object on top of a smoke stack. _firePos = [4234.45,18088.8,58.9342]; _fire = "test_EmptyObjectForFireBig" createVehicle _firePos; _fire setPos [_firePos select 0, _firePos select 1, 59];_firePos = [4234.45,18088.8,58.9342]; _fire = "test_EmptyObjectForFireBig" createVehicle _firePos; _fire setPos [_firePos select 0, … Read more

Arma 3 code snippets for making mods and missions.

This is a class that create a backpack that will unpack into a IED. It will detonate if shot at. class B_Carryall_EXP : Weapon_Bag_Base { scope = 2; class assembleInfo { assembleTo = "ModuleExplosive_IEDLandBig_F"; base = ""; displayName = "NATO Exp backpack."; dissasembleTo[] = {}; primary = 1; }; displayName = "NATO Exp backpack."; hiddenSelectionsTextures[] … Read more

Very evil and cool Arma 3 script snippets.

Spawn a bomb wherever the player clicks on the map. onMapSingleClick "’Bomb_03_F’ createVehicle _pos,TRUE";onMapSingleClick "’Bomb_03_F’ createVehicle _pos,TRUE"; Attach a KAB-250 bomb to every bullet you fire, this also gives you unlimited ammo. Very destructive script for any malicious Arma 3 player. player addEventHandler ["Fired", { ("Bomb_03_F" createVehicle [0,0,1e9]) attachTo [_this select 6, [0,0,0]]; (_this select … Read more

How to extract an Arma 3 pbo file on Linux using pbo tools.

To extract an Arma 3 pbo file on Linux use the pbo tools that have been made available for Linux. Download the tarball here. This contains binaries that will work on 64bit Linux distributions. http://securitronlinux.com/arma3/depbo-tools-0.6.24-linux-64bit.tgz. Updated link. Extract the contents of the bin directory to /usr/local/bin and the contents of the lib directory to /usr/local/lib. … Read more

How to have practically no weapon sway or recoil in an Arma 3 mission.

The weapon sway in Arma 3 is out of control right now. With the 1.54 Nexus update, the weapon sway is like a drunken Irishman. But you can remove this. player setCustomAimCoef 0.1; player addMPEventhandler ["MPRespawn", {player setCustomAimCoef 0.1}];   player setUnitRecoilCoefficient 0.1; player addEventHandler ["Respawn", {player setUnitRecoilCoefficient 0.1}];   player enablestamina false player addEventHandler … Read more