Jump to content
  • 0

[HELP] Group map markers *original post edited*


Pringlez

Question

This is continuation to a thread I seen, but there was no real support.

 

Original Thread: http://epochmod.com/forum/index.php?/topic/30948-suggestion-group-players-on-map/?hl=%2Bgroup+%2Bmarkers#entry199634

 

**

I do not own this code, I did not create it, I simply adapted it for this idea.

Original code: Tonic (Altis Life)

**

 

Here is what i have after i changed a few things.

 

File name:

GroupMarkers.sqf

Code Inside ^

/*
Original Code: Tonic (Altis Life)
Edited by [TOS] Pringlez for A3 Epoch
*/

if (getPlayerUID player == Epoch_my_GroupUID) then {

private["_markers","_civ"];
_markers = [];
_civ = [];

sleep 0.5;
if(visibleMap) then {
    {if(side _x == civ) then {_civ pushBack _x;}} foreach playableUnits;
    
    {
        _marker = createMarkerLocal [format["%1_marker",_x],visiblePosition _x];
        _marker setMarkerColorLocal "ColorBlue";
        _marker setMarkerTypeLocal "Mil_dot";
        _marker setMarkerTextLocal format["%1", _x getVariable["realname",name _x]];
    
        _markers pushBack [_marker,_x];
    } foreach _civ;
        
    while {visibleMap} do
    {
        {
            private["_marker","_unit"];
            _marker = _x select 0;
            _unit = _x select 1;
            if(!isNil "_unit") then
            {
                if(!isNull _unit) then
                {
                    _marker setMarkerPosLocal (visiblePosition _unit);
                };
            };
        } foreach _markers;
        if(!visibleMap) exitWith {};
        sleep 0.02;
    };

    {deleteMarkerLocal (_x select 0);} foreach _markers;
    _markers = [];
    _civ = [];
}};

In the init.sqf I put

[] execVM "scripts\GroupMarkers.sqf";

Once we got past the BE restrictions and got in game. The markers do not show on the map, I am unsure why...

 

Hopefully someone here can help with this!

Edited by Pringlez
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Works because the script now, because I see the first post no word which it runs.

Im sorry but this does not make sense, So i do not know what you are saying.

 

The code I posted does NOT work, that's why I posted it hoping someone can tell me why

Link to comment
Share on other sites

  • 0

This is continuation to a thread I seen, but there was no real support.

 

Original Thread: http://epochmod.com/forum/index.php?/topic/30948-suggestion-group-players-on-map/?hl=%2Bgroup+%2Bmarkers#entry199634

 

**

I do not own this code, I did not create it, I simply adapted it for this idea.

<snip>

 

 
if (getPlayerUID player == Epoch_my_GroupUID) then {
 
Did you add that line above?
What are you trying to achieve with that, comparing your player's UserID with your Group's UserID? Are they supposed to be exactly the same?
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...