Jump to content
Gekkibi

Script: draw and write to map

Recommended Posts

Don't like marker texts we have in Arma? Do they tend to clutter the map screen when you zoom out? Worry not, now you can write all the necessary map texts with a function! You can quickly draw lines too (paths, borders, you name it), or even arrows! Everything is done locally, so it won't cause problems in MP. With your own creativity you can even make it so that some markers are only created for certain side, unit type and so on. This way you can have intel, objectives, bp's, op's, etc for those who need them (private Johnson from 2nd platoon, 3rd squad don't have to know where tank platoon's BP 4 is located).

Supported symbols: 0-9, A-Z, ".", ",", "!", "?", "'" and "-". More are naturally coming later. You can give me feedback and tell me which symbols you would like to have.

Improvements over normal marker texts:

- the text won't scale up when you zoom the map. This way the map is not a wall of text

- you can rotate the text! (see example picture)

- you can create extremely large text, or ridiculously small, whatever you need

Improvements over normal marker lines:

- faster to create. The end of the lines will automatically snap together

Improvements over normal marker arrows:

- ...did you even watch the example picture?!?!

GKB_fnc_drawToMap.jpg

Here's a larger picture. It demonstrates nicely that this is much better method than using normal marker texts (or arrow symbols). The rest of the map is black because of GKB_bordersToMap (it's part of the example mission), a small script I created after I found out that you can create non-transparent markers... And after creating it I read a thread about A2 ACR DLC script that does pretty much the same thing! ...I just re-invented more gun powder... ;)

Example mission can be downloaded by clicking here.

As always, comments, feedback, bug reports and insults are welcome.

----------

How to use:

1) Download the example mission.

2) Delete GKB_mapTool folder, mission.sqm, description.ext and init.sqf (it's recommended you preview the mission first and familiarize yourself how to use this).

3) copy the remaining files to another mission folder where you want to use this.

4) incude the following line to your init.sqf

#include "libraries\GKB.sqf";

I used GKB_clickToClipboard -script to get the coordinates. Every map click is added to your clipboard. I put it to the example mission folder. Have fun with it, and I hope it will make things easier. If you'd like to use it somewhere else than in the example mission, just create a radio trigger with this in the initialization field:

nul = [] execVM "scripts\GKB_clickToClipboard.sqf";

----------

Recent update:

- Improved the font. Here's a comparison (old on top).

Still not satisfied with the font. I'm going to do an alternative font you can use when text is not transparent (otherwise it looks "fugly"). here's a preview (0 is the future font).

GKB_fnc_writeToMap%20future%20font.jpg

- Please note that previous patch made huge changes to the arguments, and you will have to replace the call arguments in your mission. Just copying new functions to the mission folder is not enough. I did this because of the feedback I got. Now it should be easier to find the right parameter. All markers use "SolidFull" brush now too. This doesn't mean you can't have transparent text, lines or arrows. It means that now alpha 1 is not transparent at all. You might have to tweak alpha parameters because default brush alpha != SolidFull brush alpha.

- Automatic offset with the arrow text! You can define where you want the text to be ("front", "rear" or "center"). No more try & error with offset-value.

- Separate color & alpha selection for arrows (text can be different color than the arrow)!

- Some minor tweaks...

- I included early WIP version of the in-game UI. It kind of works in MP, but it has some problems with indexing the markers. I do not recommend you use it in your missions. If you do, don't blame me when it's not working like you wanted it to work... ;) ).You can't change the text, color, transparency or width. Here's a picture. And here's a picture what it's going to be. Every slider and button is working:

GKB_mapTool_UI_devbuild_%3b%29.jpg

Here's how to use the WIP UI in the example mission (tools are located in custom UI that opens up every time you open the map. Yes, it's pain in the donkey, but it's what it is: WIP):

Cancel:

Removes on-map-click.

Line:

Shift-click - Set line end position. If you click close to your previous end position, it will finalize the line.

Alt-click - Remove the last line end position. If no end positions left, it will cancel the tool.

Arrow:

Shift-click - Set the arrow's head position. If you click near the same location when both the head and tail has been set, it will finalize the arrow.

Alt-click - Set the arrow's tail position. If you click near the same location when both the head and tail has been set, it will finalize the arrow.

Text:

Shift-click - Set the start position. If you click near the same location when both the start and end has been set, it will finalize the text. Start and end positions will be swapped if needed.

Alt-click - Set the end position. If you click near the same location when both the start and end has been set, it will finalize the text. Start and end positions will be swapped if needed.

Erase:

Shift/alt-click - Erases the closest line, arrow or text drawn earlier. Must be relatively close to the line.

Feedback is required! If you have any comments, please feel free to share them! Only with feedback I can make it more user-friendly. Here's the code if you want to see what and how it does this.

/* ----------------------------------------------------------------------------------------------------
Script:
GKB_mapTool / init

Author:
Gekkibi

Terms for copying, distribution and modification:
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
http://creativecommons.org/licenses/by-nc-sa/3.0/

Description:
Players can create and delete GKB_arrowToMap, GKB_drawToMap and GKB_writeToMap markers during
mission.

Line:
	Shift-click		Set line end position. If you click close to your previous end
				position, it will finalize the line.
	Alt-click		Remove the last line end position. If no end positions left,
				it will cancel the tool.
Arrow:
	Shift-click		Set the arrow's head position. If you click near the same
				location when both the head and tail has been set, it will
				finalize the arrow.
	Alt-click		Set the arrow's tail position. If you click near the same
				location when both the head and tail has been set, it will
				finalize the arrow.
Text:
	Shift-click		Set the start position. If you click near the same
				location when both the start and end has been set, it will
				finalize the text. Start and end positions will be swapped if
				needed.
	Alt-click		Set the end position. If you click near the same
				location when both the start and end has been set, it will
				finalize the text. Start and end positions will be swapped if
				needed.
Erase:
	Shift/alt-click		Erases the closest line, arrow or text drawn earlier. Must be
				relatively close to the line.

Requires: GKB_arrowToMap, GKB_drawToMap, GKB_writeToMap

Syntax for GKB_mapToolArray:
[id, [side, unique id, type, [parameters]], [side, unique id, type, [parameters]]]

Syntax for GKB_mapToolArrayLocal:
[[unique id, [marker names]], [unique id, [marker names]]]

Parameters:
No parameters

Returns:
Nil

Example:
No example needed. #include the script to init.sqf.
---------------------------------------------------------------------------------------------------- */

#define refreshRate 0.1
if (isServer) then {
if (isNil "GKB_mapToolArray") then {
	GKB_mapToolArray = [0, []];
	publicVariable "GKB_mapToolArray";
};
};
if (!isNull player) then {
GKB_mapToolTools = compile preprocessFile "GKB_mapTool\tools.sqf";
[] spawn {
	while {true} do {
		waitUntil {visibleMap};
		createDialog "GKB_mapTool";
		waitUntil {!visibleMap};
	};
};
[] spawn {
	private ["_array", "_id", "_idCurrent", "_size", "_sizeCurrent"];
	GKB_mapToolArrayLocal = [];
	_idCurrent = 0;
	_sizeCurrent = 0;
	waitUntil {!isNil "GKB_mapToolArray"};
	while {true} do {
		_id = GKB_mapToolArray select 0;
		_array = +GKB_mapToolArray select 1;
		_size = count _array;
		if (_size != _sizeCurrent) then {
			_sizeCurrent = _size;
			// Remove all markers that are meant for other factions
			for "_x" from 0 to count _array - 1 do {
				if (_array select _x select 0 != side player) then {
					_array set [_x, -1];
				};
			};
			_array = _array - [-1];
			// If no markers for your faction, clear all markers. Otherwise clear those that has been deleted
			if (count _array == 0) then {
				{
					{
						deleteMarker _x;
					} forEach (_x select 1);
				} forEach GKB_mapToolArrayLocal;
				GKB_mapToolArrayLocal = [];
			} else {
				for "_x" from 0 to count GKB_mapToolArrayLocal - 1 do {
					for "_y" from 0 to count _array - 1 do {
						if (GKB_mapToolArrayLocal select _x select 0 == _array select _y select 1) exitWith {};
						if (_y == count _array - 1) then {
							{
								deleteMarker _x;
							} forEach (GKB_mapToolArrayLocal select _x select 1);
							GKB_mapToolArrayLocal set [_x, -1];
						};
					};
				};
				GKB_mapToolArrayLocal = GKB_mapToolArrayLocal - [-1];
			};
			// If new marker has been added, create it
			if (_idCurrent != _id) then {
				_idCurrent = _id;
				// If the local array is empty, add a ghost element
				if (count GKB_mapToolArrayLocal == 0) then {
					GKB_mapToolArrayLocal = [[0, []]];
				};
				// Create new markers
				{
					for "_y" from 0 to count GKB_mapToolArrayLocal - 1 do {
						if ((_x select 1) == (GKB_mapToolArrayLocal select _y select 0)) exitWith {};
						if (_y == count GKB_mapToolArrayLocal - 1) then {
							call {
								if (_x select 2 == "line") exitWith {
									_marker = _x select 3 call GKB_fnc_drawToMap;
									GKB_mapToolArrayLocal set [count GKB_mapToolArrayLocal, [_x select 1, _marker]];
								};
								if (_x select 2 == "arrow") exitWith {
									_marker = _x select 3 call GKB_fnc_arrowToMap;
									GKB_mapToolArrayLocal set [count GKB_mapToolArrayLocal, [_x select 1, _marker]];
								};
								if (_x select 2 == "write") exitWith {
									_marker = _x select 3 call GKB_fnc_writeToMap;
									GKB_mapToolArrayLocal set [count GKB_mapToolArrayLocal, [_x select 1, _marker]];
								};
							};
						};
					};
				} forEach _array;
				// If ghost element was used, remove it
				if (GKB_mapToolArrayLocal select 0 select 0 == 0) then {
					GKB_mapToolArrayLocal set [0, -1];
					GKB_mapToolArrayLocal = GKB_mapToolArrayLocal - [-1];
				};
			};
		};
		sleep refreshRate;
	};
};
};

/* ----------------------------------------------------------------------------------------------------
Script:
GKB_mapTool / tools

Author:
Gekkibi

Terms for copying, distribution and modification:
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
http://creativecommons.org/licenses/by-nc-sa/3.0/

Description:
Tool script for GKB_mapTool

Parameters:
1st	String			Tool ("line", "arrow", "write" or "erase")

Returns:
Nil

Example:
"line" call GKB_mapToolTools;
---------------------------------------------------------------------------------------------------- */

GKB_mapToolFinishDistance = 50;
GKB_mapToolEraseDistance = 100;
GKB_mapToolLineColor = "ColorGreen";
GKB_mapToolLineWidth = 5;
GKB_mapToolLineAlpha = 1;
GKB_mapToolText = "this is an example text";
GKB_mapToolTextColor = "ColorGreen";
GKB_mapToolTextAlpha = 1;
if (!isNil "GKB_mapToolTemporary") then {
{
	deleteMarker _x;
} forEach GKB_mapToolTemporary;
};
call {
if (_this == "cancel") exitWith {
	onMapSingleClick "";
};
if (_this == "erase") exitWith {
	onMapSingleClick "
		if ((_shift || _alt) && count GKB_mapToolArrayLocal != 0) then {
			_closestDistance = GKB_mapToolEraseDistance;
			_closestMarkerArray = [];
			{
				for '_y' from 0 to count (_x select 1) - 1 do {
					if (_pos distance markerPos (_x select 1 select _y) < _closestDistance) then {
						_closestDistance = _pos distance markerPos (_x select 1 select _y);
						_closestMarkerArray = _x;
					};
				};
			} forEach GKB_mapToolArrayLocal;
			if (count _closestMarkerArray != 0) then {
				_id = GKB_mapToolArray select 0;
				_array = +GKB_mapToolArray select 1;
				for '_x' from 0 to count _array - 1 do {
					if (_array select _x select 1 == _closestMarkerArray select 0) exitWith {
						_array set [_x, -1];
					};
				};
				_array = _array - [-1];
				GKB_mapToolArray = [_id, _array];
				publicVariable 'GKB_mapToolArray';
			};
		};
		true
	";
};
if (_this == "line") exitWith {
	GKB_mapToolClicks = [];
	onMapSingleClick "
		_done = false;
		if (_shift) then {
			if (count GKB_mapToolClicks > 0) then {
				if (_pos distance (GKB_mapToolClicks select count GKB_mapToolClicks - 1) < GKB_mapToolFinishDistance) then {
					_done = true;
				};
			};
			if (!_done) then {
				GKB_mapToolClicks set [count GKB_mapToolClicks, _pos];
			};
		};
		if (_alt) then {
			if (count GKB_mapToolClicks == 0) then {
				GKB_mapToolClicks = [];
				onMapSingleClick '';
			} else {
				GKB_mapToolClicks resize count GKB_mapToolClicks - 1;
			};
		};
		{
			deleteMarker _x;
		} forEach GKB_mapToolTemporary;
		if (count GKB_mapToolClicks != 0) then {
			if (!_done) then {
				GKB_mapToolTemporary = [GKB_mapToolClicks, GKB_mapToolLineWidth, ['ColorBlack', 0.2]] call GKB_fnc_drawToMap;
			} else {
				_id = (GKB_mapToolArray select 0) + 1;
				_array = +GKB_mapToolArray select 1;
				_array set [count _array, [side player, _id, 'line', [GKB_mapToolClicks, GKB_mapToolLineWidth, [GKB_mapToolLineColor, GKB_mapToolLineAlpha]]]];
				GKB_mapToolArray = [_id, _array];
				publicVariable 'GKB_mapToolArray';
				GKB_mapToolTemporary = [];
				GKB_mapToolClicks = [];
			};
		};
		true
	";
};
if (_this == "arrow") exitWith {
	GKB_mapToolClicks = [[], []];
	onMapSingleClick "
		_done = false;
		if (_shift) then {
			if (count (GKB_mapToolClicks select 0) == 0) then {
				GKB_mapToolClicks set [0, _pos];
			} else {
				if (count (GKB_mapToolClicks select 1) != 0 && _pos distance (GKB_mapToolClicks select 0) < GKB_mapToolFinishDistance) then {
					_done = true;
				} else {
					GKB_mapToolClicks set [0, _pos];
				};
			};
		};
		if (_alt) then {
			if (count (GKB_mapToolClicks select 1) == 0) then {
				GKB_mapToolClicks set [1, _pos];
			} else {
				if (count (GKB_mapToolClicks select 0) != 0 && _pos distance (GKB_mapToolClicks select 1) < GKB_mapToolFinishDistance) then {
					_done = true;
				} else {
					GKB_mapToolClicks set [1, _pos];
				};
			};
		};
		{
			deleteMarker _x;
		} forEach GKB_mapToolTemporary;
		if (count (GKB_mapToolClicks select 0) != 0 && count (GKB_mapToolClicks select 1) != 0) then {
			_direction = ((GKB_mapToolClicks select 0 select 0) - (GKB_mapToolClicks select 1 select 0)) atan2 ((GKB_mapToolClicks select 0 select 1) - (GKB_mapToolClicks select 1 select 1));
			_length = sqrt (((GKB_mapToolClicks select 0 select 0) - (GKB_mapToolClicks select 1 select 0)) ^ 2 + ((GKB_mapToolClicks select 0 select 1) - (GKB_mapToolClicks select 1 select 1)) ^ 2);
			if (!_done) then {
				GKB_mapToolTemporary = [GKB_mapToolClicks select 0, [_direction, _length, _length / 5, _length / 50], ['ColorBlack', 0.2]] call GKB_fnc_arrowToMap;
			} else {
				_id = (GKB_mapToolArray select 0) + 1;
				_array = +GKB_mapToolArray select 1;
				_array set [count _array, [side player, _id, 'arrow', [GKB_mapToolClicks select 0, [_direction, _length, _length / 5, _length / 50], [GKB_mapToolLineColor, GKB_mapToolLineAlpha]]]];
				GKB_mapToolArray = [_id, _array];
				publicVariable 'GKB_mapToolArray';
				GKB_mapToolClicks = [[], []];
				GKB_mapToolTemporary = [];
			};
		};
		true
	";
};
if (_this == "write") exitWith {
	GKB_mapToolClicks = [[], []];
	onMapSingleClick "
		_done = false;
		if (_shift) then {
			if (count (GKB_mapToolClicks select 0) == 0) then {
				GKB_mapToolClicks set [0, _pos];
			} else {
				if (count (GKB_mapToolClicks select 1) != 0 && _pos distance (GKB_mapToolClicks select 0) < GKB_mapToolFinishDistance) then {
					_done = true;
				} else {
					GKB_mapToolClicks set [0, _pos];
				};
			};
		};
		if (_alt) then {
			if (count (GKB_mapToolClicks select 1) == 0) then {
				GKB_mapToolClicks set [1, _pos];
			} else {
				if (count (GKB_mapToolClicks select 0) != 0 && _pos distance (GKB_mapToolClicks select 1) < GKB_mapToolFinishDistance) then {
					_done = true;
				} else {
					GKB_mapToolClicks set [1, _pos];
				};
			};
		};
		{
			deleteMarker _x;
		} forEach GKB_mapToolTemporary;
		if (count (GKB_mapToolClicks select 0) != 0 && count (GKB_mapToolClicks select 1) != 0) then {
			_length = 0;
			_direction = ((GKB_mapToolClicks select 0 select 0) - (GKB_mapToolClicks select 1 select 0)) atan2 ((GKB_mapToolClicks select 0 select 1) - (GKB_mapToolClicks select 1 select 1));
			if ((GKB_mapToolClicks select 0 select 0) > (GKB_mapToolClicks select 1 select 0)) then {
				GKB_mapToolClicks = [GKB_mapToolClicks select 1, GKB_mapToolClicks select 0];
				_direction = 90 - _direction;
			} else {
				_direction = -90 - _direction;
			};
			{
				_symbol = toString [_x] call GKB_fnc_writeToMapFont;
				_length = _length + (_symbol select 1);
			} forEach toArray GKB_mapToolText;
			_length = sqrt (((GKB_mapToolClicks select 0 select 0) - (GKB_mapToolClicks select 1 select 0)) ^ 2 + ((GKB_mapToolClicks select 0 select 1) - (GKB_mapToolClicks select 1 select 1)) ^ 2) / _length;
			if (!_done) then {
				GKB_mapToolTemporary = [GKB_mapToolClicks select 0, [_direction, _length], [GKB_mapToolText, 'ColorBlack', 0.2]] call GKB_fnc_writeToMap;
			} else {
				_id = (GKB_mapToolArray select 0) + 1;
				_array = +GKB_mapToolArray select 1;
				_array set [count _array, [side player, _id, 'write', [GKB_mapToolClicks select 0, [_direction, _length], [GKB_mapToolText, GKB_mapToolTextColor, GKB_mapToolTextAlpha]]]];
				GKB_mapToolArray = [_id, _array];
				publicVariable 'GKB_mapToolArray';
				GKB_mapToolClicks = [[], []];
				GKB_mapToolTemporary = [];
			};
		};
		true
	";
};
};

/* ----------------------------------------------------------------------------------------------------
Config:
GKB_mapTool / UI

Author:
Gekkibi

Terms for copying, distribution and modification:
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
http://creativecommons.org/licenses/by-nc-sa/3.0/

Description:
Tool UI for GKB_mapTool

Parameters:
No parameters

Returns:
Nil

Example:
#include "GKB_mapTool\UI.hpp"
---------------------------------------------------------------------------------------------------- */

class GKB_mapTool {
idd = -1;
movingEnable = true;
class Controls {
	class GKB_mapTooFrame {
		idc = -1;
		type = 0;
		style = 0x40;
		text = "Gekkibi's Map Tool - WIP User Interface";
		sizeEx = 0.03;
		colorText[] = {1.0, 1.0, 1.0, 1.0};
		colorBackGround[] = {1.0, 1.0, 1.0, 1.0};
		x = 0.375 * safezoneW + safezoneX;
		y = 0.000 * safezoneH + safezoneY;
		w = 0.230 * safezoneW;
		h = 0.033 * safezoneH;
		font = "";
	};
	class GKB_mapToolButtonCancel {
		idc = -1;
		type = 1;
		style = 0x0F;
		default = true;
		text = "CANCEL";
		action = "closeDialog 0; 'cancel' ExecVM 'GKB_mapTool\Tools.sqf';";
		sizeEx = 0.03;
		colorText[] = {0.0, 0.0, 0.0, 1.0};
		colorBackground[] = {0.3, 0.5, 0.1, 1.0};
		colorFocused[] = {1.0, 0.0, 0.0, 1.0};
		colorBackGroundActive[] = {1.0, 0.0, 0.0, 1.0};
		x = 0.380 * safezoneW + safezoneX;
		y = 0.015 * safezoneH + safezoneY;
		w = 0.040 * safezoneW;
		h = 0.015 * safezoneH;
		borderSize = 0;
		colorBackgroundDisabled[] = {0.0, 0.0. 0.0, 0.0};
		colorBorder[] = {0.0, 0.0, 0.0, 0.0};
		colorDisabled[] = {0.0 , 0.0, 0.0, 0.0};
		colorShadow[] = {0.0, 0.0, 0.0, 0.0};
		font = "";
		offsetPressedX = 0;
		offsetPressedY = 0;
		offsetX = 0;
		offsetY = 0;
		soundClick[] = {"", 0, 0};
		soundEnter[] = {"", 0, 0};
		soundEscape[] = {"", 0, 0};
		soundPush[] = {"", 0, 0};
	};
	class GKB_mapToolButtonLine {
		idc = -1;
		type = 1;
		style = 0x0F;
		default = false;
		text = "LINE";
		action = "closeDialog 0; 'line' ExecVM 'GKB_mapTool\Tools.sqf';";
		sizeEx = 0.03;
		colorText[] = {0.0, 0.0, 0.0, 1.0};
		colorBackground[] = {0.3, 0.5, 0.1, 1.0};
		colorFocused[] = {1.0, 0.0, 0.0, 1.0};
		colorBackGroundActive[] = {1.0, 0.0, 0.0, 1.0};
		x = 0.425 * safezoneW + safezoneX;
		y = 0.015 * safezoneH + safezoneY;
		w = 0.040 * safezoneW;
		h = 0.015 * safezoneH;
		borderSize = 0;
		colorBackgroundDisabled[] = {0.0, 0.0. 0.0, 0.0};
		colorBorder[] = {0.0, 0.0, 0.0, 0.0};
		colorDisabled[] = {0.0 , 0.0, 0.0, 0.0};
		colorShadow[] = {0.0, 0.0, 0.0, 0.0};
		font = "";
		offsetPressedX = 0;
		offsetPressedY = 0;
		offsetX = 0;
		offsetY = 0;
		soundClick[] = {"", 0, 0};
		soundEnter[] = {"", 0, 0};
		soundEscape[] = {"", 0, 0};
		soundPush[] = {"", 0, 0};
	};
	class GKB_mapToolButtonArrow {
		idc = -1;
		type = 1;
		style = 0x0F;
		default = false;
		text = "ARROW";
		action = "closeDialog 0; 'arrow' ExecVM 'GKB_mapTool\Tools.sqf';";
		sizeEx = 0.03;
		colorText[] = {0.0, 0.0, 0.0, 1.0};
		colorBackground[] = {0.3, 0.5, 0.1, 1.0};
		colorFocused[] = {1.0, 0.0, 0.0, 1.0};
		colorBackGroundActive[] = {1.0, 0.0, 0.0, 1.0};
		x = 0.470 * safezoneW + safezoneX;
		y = 0.015 * safezoneH + safezoneY;
		w = 0.040 * safezoneW;
		h = 0.015 * safezoneH;
		borderSize = 0;
		colorBackgroundDisabled[] = {0.0, 0.0. 0.0, 0.0};
		colorBorder[] = {0.0, 0.0, 0.0, 0.0};
		colorDisabled[] = {0.0 , 0.0, 0.0, 0.0};
		colorShadow[] = {0.0, 0.0, 0.0, 0.0};
		font = "";
		offsetPressedX = 0;
		offsetPressedY = 0;
		offsetX = 0;
		offsetY = 0;
		soundClick[] = {"", 0, 0};
		soundEnter[] = {"", 0, 0};
		soundEscape[] = {"", 0, 0};
		soundPush[] = {"", 0, 0};
	};
	class GKB_mapToolButtonWrite {
		idc = -1;
		type = 1;
		style = 0x0F;
		default = false;
		text = "WRITE";
		action = "closeDialog 0; 'write' ExecVM 'GKB_mapTool\Tools.sqf';";
		sizeEx = 0.03;
		colorText[] = {0.0, 0.0, 0.0, 1.0};
		colorBackground[] = {0.3, 0.5, 0.1, 1.0};
		colorFocused[] = {1.0, 0.0, 0.0, 1.0};
		colorBackGroundActive[] = {1.0, 0.0, 0.0, 1.0};
		x = 0.515 * safezoneW + safezoneX;
		y = 0.015 * safezoneH + safezoneY;
		w = 0.040 * safezoneW;
		h = 0.015 * safezoneH;
		borderSize = 0;
		colorBackgroundDisabled[] = {0.0, 0.0. 0.0, 0.0};
		colorBorder[] = {0.0, 0.0, 0.0, 0.0};
		colorDisabled[] = {0.0 , 0.0, 0.0, 0.0};
		colorShadow[] = {0.0, 0.0, 0.0, 0.0};
		font = "";
		offsetPressedX = 0;
		offsetPressedY = 0;
		offsetX = 0;
		offsetY = 0;
		soundClick[] = {"", 0, 0};
		soundEnter[] = {"", 0, 0};
		soundEscape[] = {"", 0, 0};
		soundPush[] = {"", 0, 0};
	};
	class GKB_mapToolButtonErase {
		idc = -1;
		type = 1;
		style = 0x0F;
		default = false;
		text = "ERASE";
		action = "closeDialog 0; 'erase' ExecVM 'GKB_mapTool\Tools.sqf';";
		sizeEx = 0.03;
		colorText[] = {0.0, 0.0, 0.0, 1.0};
		colorBackground[] = {0.3, 0.5, 0.1, 1.0};
		colorFocused[] = {1.0, 0.0, 0.0, 1.0};
		colorBackGroundActive[] = {1.0, 0.0, 0.0, 1.0};
		x = 0.560 * safezoneW + safezoneX;
		y = 0.015 * safezoneH + safezoneY;
		w = 0.040 * safezoneW;
		h = 0.015 * safezoneH;
		borderSize = 0;
		colorBackgroundDisabled[] = {0.0, 0.0. 0.0, 0.0};
		colorBorder[] = {0.0, 0.0, 0.0, 0.0};
		colorDisabled[] = {0.0 , 0.0, 0.0, 0.0};
		colorShadow[] = {0.0, 0.0, 0.0, 0.0};
		font = "";
		offsetPressedX = 0;
		offsetPressedY = 0;
		offsetX = 0;
		offsetY = 0;
		soundClick[] = {"", 0, 0};
		soundEnter[] = {"", 0, 0};
		soundEscape[] = {"", 0, 0};
		soundPush[] = {"", 0, 0};
	};
};
};

----------

Files:

These are included in the example mission. If you only need certain files and know what you're doing, feel free to dig further.

GKB_fnc_drawToMap:

/* ----------------------------------------------------------------------------------------------------
Function:
GKB_fnc_drawToMap

Author:
Gekkibi

Terms for copying, distribution and modification:
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
http://creativecommons.org/licenses/by-nc-sa/3.0/

Description:
Draw lines locally to the map.

Parameters:
1st	Arrays in array		Line end positions
2nd	Number			Line width
3rd	Array			Line color (string) and alpha (number)

Returns:
Marker names in an array

Example:
_markerArray = [
	[
		[1200, 3000],
		[1600, 2800],
		[1500, 3000]
	],
	5,
	["ColorRed", 1]
] call GKB_fnc_drawToMap;
---------------------------------------------------------------------------------------------------- */

if (local player) then {
private ["_alpha", "_center", "_color", "_direction", "_length", "_marker", "_markerArray", "_posArray", "_width"];
_posArray = _this select 0;
_width = _this select 1;
_color = _this select 2 select 0;
_alpha = _this select 2 select 1;
_markerArray = [];
for "_x" from 0 to count _posArray - 2 do {
	_center = [((_posArray select _x select 0) + (_posArray select _x + 1 select 0)) / 2, ((_posArray select _x select 1) + (_posArray select _x + 1 select 1)) / 2];
	_direction = ((_posArray select _x + 1 select 0) - (_posArray select _x select 0)) atan2 ((_posArray select _x + 1 select 1) - (_posArray select _x select 1));
	_length = sqrt (((_posArray select _x select 0) - (_posArray select _x + 1 select 0)) ^ 2 + ((_posArray select _x select 1) - (_posArray select _x + 1 select 1)) ^ 2);
	for "_y" from 1 to 9001 do {
		_marker = "GKB_drawToMap_" + str(_y);
		if (markerShape _marker == "") exitWith {};
	};
	createMarkerLocal [_marker, _center];
	_marker setMarkerShapeLocal "RECTANGLE";
	_marker setMarkerBrushLocal "SolidFull";
	_marker setMarkerSizeLocal [_width / 2, _length / 2];
	_marker setMarkerDirLocal _direction;
	_marker setMarkerAlphaLocal _alpha;
	_marker setMarkerColorLocal _color;
	_markerArray set [count _markerArray, _marker];
};
{
	for "_y" from 1 to 9001 do {
		_marker = "GKB_drawToMap_" + str(_y);
		if (markerShape _marker == "") exitWith {};
	};
	createMarkerLocal [_marker, _x];
	_marker setMarkerShapeLocal "ELLIPSE";
	_marker setMarkerBrushLocal "SolidFull";
	_marker setMarkerSizeLocal [_width / 2, _width / 2];
	_marker setMarkerAlphaLocal _alpha;
	_marker setMarkerColorLocal _color;
	_markerArray set [count _markerArray, _marker];
} forEach _posArray;
_markerArray
};

GKB_fnc_arrowToMap (GKB_fnc_drawToMap is required, GKB_fnc_writeToMap is optional):

/* ----------------------------------------------------------------------------------------------------
Function:
GKB_fnc_arrowToMap

Author:
Gekkibi

Terms for copying, distribution and modification:
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
http://creativecommons.org/licenses/by-nc-sa/3.0/

Description:
Draws an arrow locally to the map. Requires GKB_fnc_drawToMap. Text inside the arrow requires
GKB_fnc_writeToMap (optional).

Parameters:
1st	Numbers in array	Position of the arrow
2nd	Numbers in array	Direction, length, width and thickness of the arrow
3rd	Array			Arrow color (string) and alpha (number)
4th	Array (optional)	Arrow text (string), text offset position ("front", "back",
				"center"), text color (string and text alpha (number)

Returns:
Marker names in an array

Example:
_markerArray = [
	[2500, 3000],
	[45, 600, 50, 5],
	["ColorGreen", 1],
	["advance!", "front", "ColorBlue", 1]
] call GKB_fnc_arrowToMap;
---------------------------------------------------------------------------------------------------- */

if (local player) then {
private ["_alpha", "_color", "_direction", "_length", "_markerArray", "_markerTextArray", "_position", "_positionArray", "_textArray", "_thickness", "_width"];
_position = _this select 0;
_direction = _this select 1 select 0;
_length = _this select 1 select 1;
_width = _this select 1 select 2;
_thickness = _this select 1 select 3;
_color = _this select 2 select 0;
_alpha = _this select 2 select 1;
_textArray = _this select 3;
_positionArray = [_position];
{
	_positionArray set [count _positionArray,
		[
			(_position select 0) + sin (270 + _direction + (_x select 0)) * sqrt (_x select 1),
			(_position select 1) + cos (270 + _direction + (_x select 0)) * sqrt (_x select 1)

		]
	];
} forEach [
	[-_width atan2 -_width, 2 * _width ^ 2],
	[-_width atan2 (_width / -2), 1.25 * _width ^ 2],
	[-_length atan2 (_width / -2), _length ^ 2 + (_width / 2) ^ 2],
	[-(_length atan2 (_width / 2)), _length ^ 2 + (_width / 2) ^ 2],
	[-(_width atan2 (_width / 2)), 1.25 * _width ^ 2],
	[-(_width atan2 _width), 2 * _width ^ 2]
];
_positionArray set [count _positionArray, _position];
_markerArray = [
	_positionArray,
	_thickness,
	[_color, _alpha]
] call GKB_fnc_drawToMap;
if (!isNil "_textArray") then {
	private ["_symbol", "_text", "_textAlpha", "_textColor", "_textDirection", "_textLength", "_textOffset", "_textPosition"];
	_text = " " + (_textArray select 0);
	_textPosition = _textArray select 1;
	_textColor = _textArray select 2;
	_textAlpha = _textArray select 3;
	_textLength = 0;
	{
		_symbol = toString [_x] call GKB_fnc_writeToMapFont;
		_textLength = _textLength + (_symbol select 1) * _width / 30;
	} forEach toArray _text;
	if (_direction / 360 mod 1 <= 0.5) then {
		_textDirection = 90 - _direction;
		call {
			if (_textPosition == "front") exitWith {
				_textOffset = _width + _textLength;
			};
			if (_textPosition == "back") exitWith {
				_textOffset = _length;
			};
			if (_textPosition == "center") exitWith {
				_textOffset = (_length + _textLength) / 2;
			};
		};
	} else {
		_textDirection = -90 - _direction;
		call {
			if (_textPosition == "front") exitWith {
				_textOffset = _width;
			};
			if (_textPosition == "back") exitWith {
				_textOffset = _length - _textLength;
			};
			if (_textPosition == "center") exitWith {
				_textOffset = (_length - _textLength) / 2;
			};
		};
	};
	_markerTextArray = [
		[
			(_position select 0) + sin (180 + _direction) * _textOffset,
			(_position select 1) + cos (180 + _direction) * _textOffset
		],
		[_textDirection, _width / 30],
		[_text, _textColor, _textAlpha]
	] call GKB_fnc_writeToMap;
} else {
	_markerTextArray = [];
};
{
	_markerArray set [count _markerArray, _x];
} forEach _markerTextArray;
_markerArray
};

GKB_fnc_writeToMapFont (a requirement for GKB_fnc_writeToMap):

/* ----------------------------------------------------------------------------------------------------
Function:
GKB_fnc_writeToMapFont

Author:
Gekkibi

Terms for copying, distribution and modification:
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
http://creativecommons.org/licenses/by-nc-sa/3.0/

Description:
Defines marker axis positions, sizes, angles and offset for GKB_fnc_writeToMap.

Parameters:
1st	String			Symbol

Returns:
Marker axis positions, sizes, angles and offset in an array
[[[posX, posY], size, angle], ...], offset]

Example:
_symbol = "G" call GKB_fnc_writeToMapFont;
---------------------------------------------------------------------------------------------------- */

private ["_return", "_symbol"];
_symbol = _this;
call {
if (_symbol == "0") exitWith {_return = [[[[-5, 0], 10, 0], [[0, -10], 4, 90], [[0, 10], 4, 90], [[5, 0], 10, 0]], 15];};
if (_symbol == "1") exitWith {_return = [[[[-5, 8], 1, 0], [[-3, 0], 11, 0]], 7];};
if (_symbol == "2") exitWith {_return = [[[[-5, -5.5], 5.5, 0], [[-5, 8], 2, 0], [[0, 0], 4, 90], [[0, 10], 4, 90], [[1, -10], 5, 90], [[5, 5], 5, 0]], 15];};
if (_symbol == "3") exitWith {_return = [[[[-5, -8], 2, 0], [[-5, 8], 2, 0], [[0, -10], 4, 90], [[0, 10], 4, 90], [[2, 0], 3, 90], [[5, -5.5], 4.5, 0], [[5, 5.5], 4.5, 0]], 15];};
if (_symbol == "4") exitWith {_return = [[[[-5, 3], 4, 0], [[-3, 8.5], 2.5, 0], [[1, 0], 5, 90], [[4, -6], 5, 0], [[4, 6], 5, 0]], 14];};
if (_symbol == "5") exitWith {_return = [[[[-5, -8], 2, 0], [[-5, 5], 6, 0], [[0, -10], 4, 90], [[0, 0], 4, 90], [[1, 10], 5, 90], [[5, -5], 5, 0]], 15];};
if (_symbol == "6") exitWith {_return = [[[[-5, 0], 10, 0], [[0, -10], 4, 90], [[0, 0], 4, 90], [[0, 10], 4, 90], [[5, -5], 5, 0], [[5, 8], 2, 0]], 15];};
if (_symbol == "7") exitWith {_return = [[[[0, 10], 6, 90], [[1, -5], 6, 0], [[3, 2], 2, 0], [[5, 6], 3, 0]], 15];};
if (_symbol == "8") exitWith {_return = [[[[-5, -5.5], 4.5, 0], [[-5, 5.5], 4.5, 0], [[0, -10], 4, 90], [[0, 0], 5, 90], [[0, 10], 4, 90], [[5, -5.5], 4.5, 0], [[5, 5.5], 4.5, 0]], 15];};
if (_symbol == "9") exitWith {_return = [[[[-5, -8], 2, 0], [[-5, 5], 5, 0], [[0, -10], 4, 90], [[0, 0], 4, 90], [[0, 10], 4, 90], [[5, 0], 10, 0]], 15];};
if (_symbol == "A") exitWith {_return = [[[[-5, -0.5], 10.5, 0], [[0, 0], 4, 90], [[0, 10], 4, 90], [[5, -0.5], 10.5, 0]], 15];};
if (_symbol == "B") exitWith {_return = [[[[-5, 0], 11, 0], [[0, -10], 4, 90], [[0, 10], 4, 90], [[0.5, 0], 4.5, 90], [[5, -5.5], 4.5, 0], [[5, 5.5], 4.5, 0]], 15];};
if (_symbol == "C") exitWith {_return = [[[[-5, 0], 10, 0], [[0, -10], 4, 90], [[0, 10], 4, 90], [[5, -8], 2, 0], [[5, 8], 2, 0]], 15];};
if (_symbol == "D") exitWith {_return = [[[[-5, 0], 11, 0], [[0, -10], 4, 90], [[0, 10], 4, 90], [[5, 0], 10, 0]], 15];};
if (_symbol == "E") exitWith {_return = [[[[-5, 0], 11, 0], [[-1, 0], 3, 90], [[1, -10], 5, 90], [[1, 10], 5, 90]], 15];};
if (_symbol == "F") exitWith {_return = [[[[-5, 0], 11, 0], [[-1, 0], 3, 90], [[1, 10], 5, 90]], 15];};
if (_symbol == "G") exitWith {_return = [[[[-5, 0], 10, 0], [[0, -10], 4, 90], [[0, 10], 4, 90], [[2, 0], 2, 90], [[5, -4.5], 5.5, 0], [[5, 8], 2, 0]], 15];};
if (_symbol == "H") exitWith {_return = [[[[-5, 0], 11, 0], [[0, 0], 4, 90], [[5, 0], 11, 0]], 15];};
if (_symbol == "I") exitWith {_return = [[[[-5, 0], 11, 0]], 5];};
if (_symbol == "J") exitWith {_return = [[[[-5, -8], 2, 0], [[0, -10], 4, 90], [[5, 0.5], 10.5, 0]], 15];};
if (_symbol == "K") exitWith {_return = [[[[-5, 0], 11, 0], [[-1.5, 0], 2.5, 90], [[1, -3], 2, 0], [[1, 3], 2, 0], [[3, -6], 2, 0], [[3, 6], 2, 0], [[5, -9], 2, 0], [[5, 9], 2, 0]], 15];};
if (_symbol == "L") exitWith {_return = [[[[-5, 0], 11, 0], [[0, -10], 4, 90]], 13];};
if (_symbol == "M") exitWith {_return = [[[[-5, 0], 11, 0], [[-3, 10], 1, 0], [[-2, 7], 2, 0], [[0, 4], 2, 0], [[2, 7], 2, 0], [[3, 10], 1, 0], [[5, 0], 11, 0]], 15];};
if (_symbol == "N") exitWith {_return = [[[[-5, 0], 11, 0], [[-3, 10], 1, 0], [[-2, 6], 3, 0], [[0, 0], 4, 0], [[2, -6], 3, 0], [[3, -10], 1, 0], [[5, 0], 11, 0]], 15];};
if (_symbol == "O") exitWith {_return = [[[[-5, 0], 10, 0], [[0, -10], 4, 90], [[0, 10], 4, 90], [[5, 0], 10, 0]], 15];};
if (_symbol == "P") exitWith {_return = [[[[-5, 0], 11, 0], [[0, 0], 4, 90], [[0, 10], 4, 90], [[5, 5], 5, 0]], 15];};
if (_symbol == "Q") exitWith {_return = [[[[-5, 0], 10, 0], [[0, -10], 4, 90], [[0, 10], 4, 90], [[2, -8], 1, 0], [[3, -12], 1, 0], [[5, 0], 10, 0]], 15];};
if (_symbol == "R") exitWith {_return = [[[[-5, 0], 11, 0], [[0, 0], 4, 90], [[0, 10], 4, 90], [[1, -3], 2, 0], [[3, -6], 2, 0], [[5, -9], 2, 0], [[5, 5], 5, 0]], 15];};
if (_symbol == "S") exitWith {_return = [[[[-5, -8], 2, 0], [[-5, 5], 5, 0], [[0, -10], 4, 90], [[0, 0], 4, 90], [[0, 10], 4, 90], [[5, -5], 5, 0], [[5, 8], 2, 0]], 15];};
if (_symbol == "T") exitWith {_return = [[[[0, -1], 10, 0], [[0, 10], 6, 90]], 15];};
if (_symbol == "U") exitWith {_return = [[[[-5, 1], 10, 0], [[0, -10], 5, 90], [[5, 1], 10, 0]], 15];};
if (_symbol == "V") exitWith {_return = [[[[-5, 7], 4, 0], [[-4, 1], 2, 0], [[-3, -3], 2, 0], [[-2, -7], 2, 0], [[-0.5, -10], 1.5, 90], [[1, -7], 2, 0], [[2, -3], 2, 0], [[3, 1], 2, 0], [[4, 7], 4, 0]], 14];};
if (_symbol == "W") exitWith {_return = [[[[-5, 6], 5, 0], [[-4, -4], 5, 0], [[-2.5, -10], 1.5, 90], [[0, -8], 2, 90], [[0, -5], 2, 0], [[2.5, -10], 1.5, 90], [[4, -4], 5, 0], [[5, 6], 5, 0]], 15];};
if (_symbol == "X") exitWith {_return = [[[[-5, -8], 3, 0], [[-5, 8], 3, 0], [[-4, -3], 2, 0], [[-4, 3], 2, 0], [[-1.5, 0], 2.5, 90], [[1, -3], 2, 0], [[1, 3], 2, 0], [[2, -8], 3, 0], [[2, 8], 3, 0]], 12];};
if (_symbol == "Y") exitWith {_return = [[[[-5, 9.5], 1.5, 0], [[-4, 6.5], 1.5, 0], [[-3, 3.5], 1.5, 0], [[-2, 1], 1, 0], [[0, -6.5], 4.5, 0], [[0, -1], 2, 90], [[2, 1], 1, 0], [[3, 3.5], 1.5, 0], [[4, 6.5], 1.5, 0], [[5, 9.5], 1.5, 0]], 15];};
if (_symbol == "Z") exitWith {_return = [[[[-4, -8], 1, 0], [[-3, -6], 1, 0], [[-2, -4], 1, 0], [[-1, -2], 1, 0], [[0, -10], 6, 90], [[0, 0], 1, 0], [[0, 10], 6, 90], [[1, 2], 1, 0], [[2, 4], 1, 0], [[3, 6], 1, 0], [[4, 8], 1, 0]], 15];};
if (_symbol == " ") exitWith {_return = [[], 15];};
if (_symbol == ".") exitWith {_return = [[[[-5, -10], 1, 0]], 5];};
if (_symbol == ",") exitWith {_return = [[[[-5, -11], 2, 0]], 5];};
if (_symbol == "!") exitWith {_return = [[[[-5, -10], 1, 0], [[-5, 2], 9, 0]], 5];};
if (_symbol == "?") exitWith {_return = [[[[-5, 8], 2, 0], [[0, -10], 1, 0], [[0, -3.5], 3.5, 0], [[0, 10], 4, 90], [[2.5, 0], 1.5, 90], [[5, 5], 5, 0]], 15];};
if (_symbol == "-") exitWith {_return = [[[[-4, 0], 3, 90]], 7];};
if (_symbol == "'") exitWith {_return = [[[[-5, 10], 3, 0]], 5];};
_return = [[], 0];
};
_return

GKB_fnc_writeToMap (GKB_fnc_writeToMapFont is required):

/* ----------------------------------------------------------------------------------------------------
Function:
GKB_fnc_writeToMap

Author:
Gekkibi

Terms for copying, distribution and modification:
Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
http://creativecommons.org/licenses/by-nc-sa/3.0/

Description:
Write text locally to the map. Requires GKB_fnc_writeToMapFont.

Parameters:
1st	Numbers in array	Position of the text
2nd	Numbers in array	Rotation and the size of the text. Negative rotation rotates
				the text clockwise
3rd	Array			Text (string), text color (string) and alpha (number)

Returns:
Marker names in an array

Example:
_text = [
	[1000, 5000],
	[-20, 2],
	["suspected enemy minefield!", "ColorRed", 0.9]
] call GKB_fnc_writeToMap;
---------------------------------------------------------------------------------------------------- */

if (local player) then {
private ["_alpha", "_color", "_createMarker", "_direction", "_marker", "_markerArray", "_offset", "_position", "_scale", "_symbol", "_text"];
_position = _this select 0;
_direction = _this select 1 select 0;
_scale = _this select 1 select 1;
_text = toArray (_this select 2 select 0);
_color = _this select 2 select 1;
_alpha = _this select 2 select 2;
_markerArray = [];
_offset = [0, 0];
for "_y" from 1 to count _text do {
	_symbol = toString [_text select _y - 1] call GKB_fnc_writeToMapFont;
	{
		private ["_AdjustDirection", "_adjustPosition", "_adjustSize", "_vectorDirection", "_vectorLength"];
		_vectorDirection = (_x select 0 select 0) atan2 (_x select 0 select 1) - _direction;
		_vectorLength = sqrt ((_x select 0 select 0) ^ 2 + (_x select 0 select 1) ^ 2);
		_adjustPosition = [sin _vectorDirection * _vectorLength * _scale, cos _vectorDirection * _vectorLength * _scale];
		_adjustSize = _x select 1;
		_adjustDirection = (_x select 2) - _direction;
		for "_z" from 1 to 9001 do {
			_marker = "GKB_writeToMap_" + str(_y) + "_" + str(_z);
			if (markerShape _marker == "") exitWith {};
		};
		createMarkerLocal [_marker, [(_position select 0) + (_adjustPosition select 0) + (_offset select 0), (_position select 1) + (_adjustPosition select 1) + (_offset select 1)]];
		_marker setMarkerShapeLocal "RECTANGLE";
		_marker setMarkerBrushLocal "SolidFull";
		_marker setMarkerSizeLocal [_scale, _scale * _adjustSize];
		_marker setMarkerDirLocal _adjustDirection;
		_marker setMarkerAlphaLocal _alpha;
		_marker setMarkerColorLocal _color;
		_markerArray set [count _markerArray, _marker];
	} forEach (_symbol select 0);
	_offset = [
		(_offset select 0) + (_symbol select 1) * _scale * cos _direction,
		(_offset select 1) + (_symbol select 1) * _scale * sin _direction
	];
};
_markerArray
};

Edited by Gekkibi
New version: Improved WIP UI
  • Like 1

Share this post


Link to post
Share on other sites

Looks spiffy! I'm sure I will use it in a mission.

Share this post


Link to post
Share on other sites

Bump! Had to do it because now these functions support numbers and GKB_fnc_arrowToMap allows you to use awesome arrows as well!

Share this post


Link to post
Share on other sites

New version: improved text font. I'm still not satisfied with it, and probably a completely different font is coming. See the first post if you'd like to know more.

Keep the feedback coming. I have received plenty of cheers, but very little feedback. Shuko was kind enough to give feedback on IRC. :)

Share this post


Link to post
Share on other sites

Great scripts. I was going to suggest having a black border around the edges of the text, but I guess that won't work too well since the characters are made up of individual markers.

Share this post


Link to post
Share on other sites
Great scripts. I was going to suggest having a black border around the edges of the text, but I guess that won't work too well since the characters are made up of individual markers.

Well, that could be done by creating a black marker that is few pixels bigger, and then another marker with chosen color on top of it. That way it would show the black marker as borders. But ofc, then transparency wouldnt work.

Share this post


Link to post
Share on other sites
Well, that could be done by creating a black marker that is few pixels bigger, and then another marker with chosen color on top of it. That way it would show the black marker as borders. But ofc, then transparency wouldnt work.

I was thinking about doubling the markers and use border brush. This is possible with the WIP font, but it requires micromanagement on my part because they have to be created in the right order so that certain parts of border markers are hidden under non-transparent markers. Naturally only possible if the text is not transparent. :(

Share this post


Link to post
Share on other sites

Gekkibi, from what I read here this is all available as markers set up pre-mission.

It's looking really nice and well done, the arrows etc are going to be a big help with briefing etc and planning.

Are you planning to release tools so we can 'draw on the map' in game using the same functions?

Share this post


Link to post
Share on other sites
Gekkibi, from what I read here this is all available as markers set up pre-mission.

Yes, that is correct.

Are you planning to release tools so we can 'draw on the map' in game using the same functions?

Glad you asked. The answer is "YES!!!". The problem is that I suck at making UI's. I have to learn it before I can create anything fancy.

To all, new version! I added the possibility to use different color with the arrow text. Some other tweaks as well. Note that the arguments have been swapped around (feedback), so don't just copypaste the functions to your mission without editing the function calls.

Share this post


Link to post
Share on other sites
The problem is that I suck at making UI's. I have to learn it before I can create anything fancy.

I know what you mean - a WYSYWIG GUI editor would be so great, but maybe a little limited.

Hopefully someone can create such a GUI to help make a GUI :confused:?

Share this post


Link to post
Share on other sites

New version: I included WIP version of the UI to the example mission. Please, test it and give me feedback how it works so far. Is it clumsy?

More info in the 1st post.

Share this post


Link to post
Share on other sites

New version: The WIP UI kind of works in MP now. Relatively safe to use in coop missions, especially without JIP. If there are more than one faction then the indexing falls apart and starts to eat old markers from other factions...

Feedback required.

...And yes, I know action menu sucks. This is (hopefully) only a temporary solution.

Share this post


Link to post
Share on other sites

New version: First version of the graphical UI released (see the 1st post): No more action menu crap.

Share this post


Link to post
Share on other sites

Is it just me, or is it that every time I click "left-alt" my unit/player is transferred to where I clicked on the map with the "alt" key.

If possible, could you make it so that the person using it does not get warped any where in anyway.

anyways, great script!

Okay, I JUST realized... I removed everything to your script and realized that I still got teleported while in the editor (I hadn't known they updated the game to have that function when in the editor) so please disregard this post. If anyone else is wondering that aswell... It's the game, not the scripting.

But for a scripting suggestion I would change that key from "ALT" to something else this way there isn't any confusion.

Thanks again for your work.

Edited by ShinShin
Problem is not your script.

Share this post


Link to post
Share on other sites

Fantastic looking script! This is the sort of thing I've been looking for for a long time. I shall download and test this immediately.

On a slight side note: Is there any chance of a mod version of this?

Share this post


Link to post
Share on other sites
Fantastic looking script! This is the sort of thing I've been looking for for a long time. I shall download and test this immediately.

On a slight side note: Is there any chance of a mod version of this?

Sorry for a late reply, I've been engaged elsewhere for some time now.

There's probably going to be a mod version as well, but only after I have made the UI working properly.

Share this post


Link to post
Share on other sites

More detailed Instructions would be real nice, i dont quite understand this i get it shift click alt click ok cool i have an arrow on the map..... then what?

Share this post


Link to post
Share on other sites

I don't mean to bump a necro but is anyone able to update this to the latest Arma 3 version? It's currently unusable, and I am unable to find anything else like it. 
If someone does update it, +1 for adding support (somehow) to use it in the editor.

Share this post


Link to post
Share on other sites
15 hours ago, PortalGunner said:

and I am unable to find anything else like it


Have you tried Arma 3 own draw on map functionality?

Share this post


Link to post
Share on other sites
44 minutes ago, killzone_kid said:

Have you tried Arma 3 own draw on map functionality?

 

I'm not. I read some where holding left ctrl and LMB should work but nadda. Maybe I'm missing something?

 

EDIT: read also holding ctrl+shift to draw straight line....no work either.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×