Posted: . At: 10:14 PM. This was 7 years ago. Post ID: 11022
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Some very useful Arma 3 scripting samples to enhance your missions.


This script is very useful, this will show player names within 320m. This would be most useful for multiplayer missions.

see_player_locations_esp = addMissionEventHandler ['Draw3D', {
	{
		if (!isNull _x && (side _x) == west) then {
			if (vehicle _x != cameraOn) then {
				_name = format ["%1" + endl + "%2", name _x, str((configFile >> "CfgVehicles" >> TypeOf _x >> "displayName") call BIS_fnc_GetCfgData)];
				_pos = (_x modelToWorld ((_x selectionPosition 'neck') vectorAdd [0,0,0.25]));
 
				if ((cameraOn distance _x) <= 320) then {
						_color = [0,0.27,0.84,1];
						if (side _x == opfor) then {
							_color = [0.9,0.11,0,1];
						};
						if (side _x == civilian) then {
							_color = [0.4, 0, 0.4, 1];
						};
						if (side _x == independent) then {
							_color = [0, 0.8, 0.2, 1];
						};
						if (side _x == west) then {
							_color = [0.2, 0.2, 0.9, 1];
						};
						drawIcon3D [getText (configFile >> "CfgVehicles" >> typeOf _x >> "icon"), _color, _pos, 0.6, 0.6, 180, (format ['%1 (%2m)', _name, (round(cameraOn distance _x))]), 1, 0.03, 'RobotoCondensedLight','center',true];
				};
			};
		};
	} foreach allUnits;
}];

This is a most useful feature to enable better identification of BLUFOR players.

This code sample in a trigger will be set off when the three tasks are complete.

{if ( [_x] call bis_fnc_taskExists ) then {
          [_x] call bis_fnc_taskCompleted      
} else {
	false;
};
} count ["task1","task2","task3"] == 3;

Add a nice blur fade in effect and the name of the mission appears when you start a single-player mission. Add this in the init.sqf file.

// --- Info text
if (time &lt; 10) then
{
	titleCut ["", "BLACK FADED", 999];
	[] Spawn {
		waitUntil{!(isNil "BIS_fnc_init")};
 
		// Info text
		[str("Op Silent Spring") , str(date select 1) + "." + str(date select 2) + "." + str(date select 0), str("Alpha Team 1")] spawn BIS_fnc_infoText;
 
		sleep 12;
		"dynamicBlur" ppEffectEnable true;
		"dynamicBlur" ppEffectAdjust [6];
		"dynamicBlur" ppEffectCommit 0;
		"dynamicBlur" ppEffectAdjust [0.0];
		"dynamicBlur" ppEffectCommit 7;
		titleCut ["", "BLACK IN", 5]
	};
};

Add a game logic named logic1 in the middle of your base, and then add this into your initServer.sqf. This will make all buildings and hangars around your base indestructible.

{ _x allowdamage false; } foreach (nearestTerrainObjects [logic1,["house"],1900]);

And this is another way to handle this. This will make all buildings in a radius around the marker “respawn_east” indestructible.

{
	_x allowdamage false;
} foreach (nearestTerrainObjects [getMarkerPos "respawn_east",["house"],900]);

Have a random loading splash screen for your Arma 3 mission. This is just like Invade and Annex Tanoa #1.

loadScreen = __EVAL(["\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_action_co.paa","\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_mars_co.paa","\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_maskrtnik_co.paa","\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_olives_co.paa","\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_pate_co.paa","\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_pills_co.paa","\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_plane_co.paa","\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_supermarket_co.paa","\A3\Structures_F_Argo\Commercial\Billboards\Data\Advertisements\bill_winery_co.paa"] select floor random 9);

Spawn an enemy jet to patrol an AO.

http://securitronlinux.com/bejiitaswrath/easily-spawn-an-enemy-jet-to-patrol-an-ao-in-arma-3-with-a-script/.

Spawn a building in a random position in Arma 3.

http://securitronlinux.com/bejiitaswrath/how-to-spawn-a-randomly-placed-building-in-arma-3/.

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

http://securitronlinux.com/bejiitaswrath/how-to-extract-an-arma-3-pbo-file-on-linux-using-pbo-tools/.

How to get RHS units to garrison buildings in Arma 3.

http://securitronlinux.com/it/how-to-get-rhs-units-to-garrison-buildings-in-arma-3/.

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

http://securitronlinux.com/bejiitaswrath/how-to-have-practically-no-weapon-sway-or-recoil-in-an-arma-3-mission/.

Arma 3 tips and information for new players of this war simulation game.

http://securitronlinux.com/arma-3-tips-and-information-for-new-players-of-this-war-simulation-game/.

More useful Arma 3 script samples: http://securitronlinux.com/battlefield/some-more-arma-3-script-samples/.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.