Posted: . At: 8:08 AM. This was 1 year ago. Post ID: 17250
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.


Very useful Arma 3 scripting samples.


How to make craters in the editor

Making a crater in the EDEN editor is very easy, use this script in a Game Logic object.

1
2
3
4
5
6
7
private _difference = -4; 
if (isServer) then { 
private _pos = [(getPosATL this) select 0, (getPosATL this) select 1]; 
private _curr_height = getTerrainHeight _pos; 
private _new_pos_alt = [_pos select 0, _pos select 1, _curr_height + _difference]; 
setTerrainHeight [[_new_pos_alt], true]; 
};

The _difference variable is the amount you wish to lower the ground by, just place the Game Logic where you want the crater to be and preview the mission to see a nice crater.

Enable volumetric clouds in Arma 3. Put this line in the initServer.sqf file.

setSimulWeatherLayers 10;

This really does work very well.

Display a compass at the top of the screen. Put this in the initPlayerLocal.sqf.

player getVariable ["Compass", "RscCompass" cutrsc ["RscCompass","plain"]];

Draw a small Arma 3 logo and the version number of the game on the in-game HUD.

initPlayerLocal.sqf
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
[] spawn {
	disableSerialization;
	waitUntil{ !isNull (findDisplay 46) };
	private _ctrlText = (findDisplay 46) ctrlCreate ["RscStructuredText",-1];
	private _sitrep = format ["<t font='PuristaMedium' align='right' size='0.6' shadow='0'>%3<br/>%1 %2</t>", (productVersion select 2), (productVersion select 3),"<img image='a3\ui_f\data\Logos\arma3_ingame_ca.paa' size='1.0'/>"];
	_ctrlText ctrlSetStructuredText parseText _sitrep;
	_ctrlText ctrlSetTextColor [1,0.4,0.2,0.7];
	_ctrlText ctrlSetBackgroundColor [0,0,0,0];
	_ctrlText ctrlSetPosition [
		(safezoneW - 22 * (((safezoneW / safezoneH) min 1.2) / 40)) + (safeZoneX)
		,(safezoneH - 5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)) + (safeZoneY)
		,20 * (((safezoneW / safezoneH) min 1.2) / 40)
		,5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)
	];
	_ctrlText ctrlSetFade 0.4;
	_ctrlText ctrlCommit 0;
	true;
};

The line of code below will show a hint displaying the killer of a unit and the killed unit’s name.

addMissionEventHandler ["entityKilled", {params ["_killed","_killer"];if (local _killer) then {  format["%1 killed %2", name _killer, name _killed] remoteExec ["hint", 0];};}];

This shows AI kills as well. This really works well if you wish to have a way to track kills.


Leave a Comment

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