Jump to content
  • 0

arma 3 epoch player map marker


Sonin

Question

6 answers to this question

Recommended Posts

  • 0
//TrackPlayer.sqf
// Horbin
// 4/28/2015
// Inputs: player object
// Generates a map symbol that follows the player 
// Symbol is updated every five seconds.
private ["_player","_markerName","_mkr"];
_player = _this select 0;
_markerName = format ["TrackPlayer_%1",_group];
_mkr = createMarker [_markerName, [0,0]];
//["Markers",_markerName] call FuMS_fnc_HC_Util_HC_AddObject;
_markerName setMarkerColor "ColorRed";
_markerName setMarkerShape "ICON";

// can add code to get the players name and add that info to the marker here.

[_player, _markerName] spawn
{
    private ["_player","_mkr","_symbol","_veh"];
	_player = _this select 0;
	_mkr = _this select 1;
	
	while {alive _player} do
	{
        _veh = vehicle (_player);
        if (_veh isKindOf "Man") then {_symbol = "o_inf";};
        if (_veh isKindOf "Tank") then {_symbol = "o_armor";};
        if (_veh isKindOf "Car") then {_symbol = "o_motor_inf";};
        if (_veh isKindOf "Truck" or _veh isKindOf "Wheeled_APC") then {_symbol = "o_mech_inf";};
        if (_veh isKindOf "Air") then {_symbol = "o_air";};
        if (_veh isKindOf "Ship") then {_symbol = "o_naval";};
        _mkr setMarkerType _symbol;
        
        _mkr setMarkerPos (getPos _player);
		sleep 5;      
	};
  //  ["Markers",_mkr] call FuMS_fnc_HC_Util_HC_RemoveObject;
	deleteMarker _mkr;
};

Above is a modified script from my FuMS mod. This script will generate a marker on the player based upon the vehicle type he is in.  This script can be modified to grab the players name and add it to the marker if you wished.

Just need to add  a call to this script as part of the players init routine

 

Ex:

[_player] call TrackPlayer;

 

Not tested on players, but it works great for tracking AI groups :)

You will probably need to add some BE filters to account for markers too.....

Link to comment
Share on other sites

  • 0

Try this in init.sqf

if(hasInterface)then{
[] spawn {
		waitUntil{uiSleep 0.2;!isNil "EPOCH_playerEnergyMax"};//wait for player to load
		_playerPos = createMarkerLocal ["PlayerPOS", position player];//create marker
		"PlayerPOS" setMarkerTextLocal "You";
		"PlayerPOS" setMarkerTypeLocal "hd_destroy";
		"PlayerPOS" setMarkerColorLocal "ColorRed";
		while{true}do{
			waitUntil {uiSleep 0.2;visibleMap};//update marker only while map is open
			"PlayerPOS" setMarkerPosLocal position player;
		};
	};
};
BE filters
scripts.txt
7 setMarker !="PlayerPOS"
7 createMarker !="PlayerPOS"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...