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

How to remove the Zeus Eagle in Arma 3.

This code placed in the init of the Zeus module in Arma 3 will disable the annoying Zeus eagle. 1 2 3 [this, [-1, -2, 0, 3, 4, 5, 6, 7, 8]] call bis_fnc_setcuratorvisionmodes; this setVariable ["showNotification", false]; this setVariable ["birdType",""];[this, [-1, -2, 0, 3, 4, 5, 6, 7, 8]] call bis_fnc_setcuratorvisionmodes; this setVariable ["showNotification", … Read more

How to have a flag at half mast in Arma 3 without mods.

Having a flag at half-mast in Arma 3 is very easy. This code in the init of the flagpole will set the flag to half-mast. This does not require stupid mods. Just simple scripting. call{this setFlagAnimationPhase 0.5;}call{this setFlagAnimationPhase 0.5;} This is very easy to do. Add this code to your description.ext file to easily have … Read more

Very useful code samples for decorating your base in Arma 3.

Decorating a base in Arma 3 is a lot of fun. Here is some useful code to help out with this. Spawn an LAU-68/A 70mm Rocket pod on a camp table. 1 2 3 _pos261 = [0,0,0]; _tree261 = createSimpleObject ["a3\weapons_f_epc\Ammo\Rocket_Pod_02_F.p3d", _pos261]; _tree261 attachTo [t3,[0,0,0.70]];_pos261 = [0,0,0]; _tree261 = createSimpleObject ["a3\weapons_f_epc\Ammo\Rocket_Pod_02_F.p3d", _pos261]; _tree261 attachTo [t3,[0,0,0.70]]; … Read more

How to have an addaction in Arma 3 that pops up when you are near.

An addaction in Arma 3 can be used to access anything you wish, but they have a 50m range. This can be fixed easily, the example below uses a 2m range for the addaction. [hightablelaptop,["Switch off Comms.","deleteVehicle (_this select 0)",[],0,true,true,"","(_this distance _target) < 2"]] remoteExec ["addAction",0];[hightablelaptop,["Switch off Comms.","deleteVehicle (_this select 0)",[],0,true,true,"","(_this distance _target) < 2"]] … Read more

How to spawn a nuke explosion with a script in Arma 3 with RHS.

This is how to spawn a nuke explosion with a script in Arma 3. This only does damage in a small radius, but it still is a lot of fun. [getMarkerPos "respawn_west", 500] call rhs_fnc_ss21_nuke;[getMarkerPos "respawn_west", 500] call rhs_fnc_ss21_nuke; This section of code will spawn a HE SCUD missile on a certain location defined by … Read more

A very nice script for Arma 3. This is a quick revive script to bypass all of the hassle.

This script is a quick revive script that allows players to revive down players that are injured and unconscious in one simple action. This works very well. myfnc_uncon_special = { params ["_unit", "_isUnconscious"];   if ( (typeOf player == "rhsusf_socom_marsoc_sarc") or (typeOf player == "rhsusf_army_ocp_medic") ) then { private _action = _unit addAction ["Revive", {call … Read more

How to properly call a function from a trigger in Arma 3.

Calling a function from a trigger in Arma 3 can be very tricky, this is how I managed to do it. commanderDead = { [’task2′,’SUCCEEDED’] call BIS_fnc_taskSetState; { _x setMarkerPos getPos house1; } forEach ["hqMarker", "hqCircle"]; [player, player, opfor, ["LOP_AFR_OPF_Infantry_IED","LOP_AFR_OPF_Infantry_Corpsman","LOP_AFR_OPF_Infantry_GL","LOP_AFR_OPF_Infantry_Rifleman_4","LOP_AFR_OPF_Infantry_Rifleman_4","LOP_AFR_OPF_Infantry_AR_Asst_2","LOP_AFR_OPF_Infantry_AT","LOP_AFR_OPF_Infantry_Rifleman_8","LOP_AFR_OPF_Infantry_Rifleman_5"], 16, 120] spawn BIS_fnc_spawnEnemy; private _attack = [] spawn KER_fnc_attackers; };   man2 = createTrigger … Read more

How to spawn RHS or Project OPFOR units with the Arma 3 Spawn AI module.

The spawn AI module for Arma 3 is very good for spawning AI in a mission and having them capture sectors automatically, but how do you spawn AI from mods? This is easy. Just use this code below in the initialization section of the module. this setVariable[ "side", "East", true ]; this setVariable[ "faction", "LOP_ChDKZ", … Read more

Nice script for Arma 3 that will provide icons and player name over heads.

This is a very nice script for Arma 3 that will give each player a icon over their heads and their name and role. This is very useful for IFF and works very well. addMissionEventHandler ["Draw3D", { { if ((side _x) == west) then { drawIcon3D [([_x, "texture"] call BIS_fnc_rankParams), [0,1,1,1], visiblePosition _x vectorAdd [0,0,3], … Read more

The best way to have music coming from a radio in Arma 3, this really works.

This code will play music from a Radio in Arma 3. fnc_radio = compileFInal preprocessfilelinenumbers "a3\missions_f_exp\Campaign\Missions\EXP_m01.Tanoa\functions\fn_EXP_m01_radioMusic.sqf";   [radio1] call fnc_radio;fnc_radio = compileFInal preprocessfilelinenumbers "a3\missions_f_exp\Campaign\Missions\EXP_m01.Tanoa\functions\fn_EXP_m01_radioMusic.sqf"; [radio1] call fnc_radio; Just place a radio item and name it radio1, then put the code above in your initPlayerServer.sqf file. This allows a radio to play music. Once a track … Read more

Declaring global variables in Arma 3 scripting.

Declaring a global variable in Arma 3 in very easy, this one is for defining the max radius of a battle zone. Declare it at the initial phase of your mission scripting like this. missionNamespace setVariable [’PARAMS_AOSize’,1000,FALSE]; // Radius of main AO.missionNamespace setVariable [‘PARAMS_AOSize’,1000,FALSE]; // Radius of main AO. Then it may be used where … Read more

How to protect your base in Arma 3 from trolls and griefing.

This very useful script when placed in the initPlayerLocal.sqf file will protect a base from придурки who are firing into your base and destroying everything. player addEventHandler ["FiredMan", {   _p = _this select 6; if( _p distance (getMarkerPos "respawn_west") < 1000) then { deleteVehicle _p; } else { _p spawn { waitUntil { if( … Read more