How to have an arsenal easily on a crate in an Arma 3 RHS mission.
More Arma 3 scripts.
More Arma 3 scripts.
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
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
This simple example shows how to check if a file exists or not. This is how we do this. if [ -f "/home/jason/foo" ]if [ -f "/home/jason/foo" ] Putting it together in a script makes it simple to verify if the file exists or not. if [ -f "/home/jason/foo" ] then echo "file does exist." … Read more
This is how to render a decal of a road surface on the ground in Arma 3 without using mods. Run this script in initServer.sqf and it will work fine, it will spawn a runway road surface in Arma 3 when you run your mission. _pos = getPos bol1; //define a position, close to player … Read more
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
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
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
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
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
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