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

Posted: August 8, 2017. At: 10:14 PM. This was 4 months 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.

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;

This code is to be put in the init.sqf file. This will add icons above players heads, this means that you will be able to identify friendlies versus enemies.

[] spawn {
    ["FriendlyHUD", "onEachFrame", {
        _target = cursorTarget;
        _isFriendly = if ( ( (side player) getFriend (side _target) ) > 0.6 ) then {true} else {false};
        if (alive _target && _isFriendly && (_target isKindOf "Man") && (player distance _target) <= 900) then {
            _markerPath = (configFile >> "CfgMarkers" >> "b_inf" >> "icon") call BIS_fnc_getCfgData;
            _configColor = (configFile >> "CfgMarkerColors" >> (format["Color%1", (side _target)]) >> "color") call BIS_fnc_getCfgData;
            _color = _configColor call BIS_fnc_colorConfigToRGBA;
            _pos = _target modelToWorld (_target selectionPosition "head_axis");
            drawIcon3D [_markerPath, _color, [_pos select 0, _pos select 1, (_pos select 2) + 0.5], 1, 1, 0, (name _target), 0];
        };
    }] call BIS_fnc_addStackedEventHandler;
};

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

// --- Info text
if (time < 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]);

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/.

No comments have been made. Use this form to start the conversation :)

Leave a Reply