Jump to content
  • 0

Adding A Visual Marker On Friendly Tagged Players


seeker619

Question

short version:  Looking for where the "Tag Friendly" script is located in Epoch.

 

long version:   There was a dayz mod when you tagged them Friendly it would add a little glowing globe around their wrist that only you could see.  it was small so i switched the globe to a Down Red Arrow that would be over the persons head.. no missing it. you could change _tag = "Sign_sphere10cm_EP1" createVehicleLocal _position; to whatever you wanted.. a huge POW flag attached to the player, whatever.. Im looking to implement the code below in to the epoch script.

// create tags
{
  if (isPlayer _x) then {
    _rcharID = _x getVariable ["characterID", "0"];
    _rfriendlies = _x getVariable ["friendlies", []];
    _rfriendlyTo = _x getVariable ["friendlyTo", []];
    if ((_rcharID in _friendlies) and (_charID in _rfriendlies)) then {
      if (!(_charID in _rfriendlyTo)) then {
        _position = [0,0,0];
        _tag = "Sign_sphere10cm_EP1" createVehicleLocal _position;
        _tag attachTo [_x,[0,0,0],"lwrist"];
        _tag setVariable ["belongsTo", _rcharID];
        _rfriendlyTo set [count _rfriendlyTo, _charID];
        _x setVariable ["friendlyTo", _rfriendlyTo, true];
      _tagList set [count _tagList, [_x, _tag]];
        player setVariable ["tagList", _tagList];
      titleText [format["You and %1 are now tagged as friendlies.", (name _x)], "PLAIN DOWN"];
      };
    };
};
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

First lets try to make this as simple as possible. Maybe something like this.

 

Inside this block at player_updateGUI.sqf

if (!(_charID in _rfriendlyTo)) then {

_rfriendlyTo set [count _rfriendlyTo, _charID];
_humanityTarget setVariable ["friendlyTo", _rfriendlyTo, true];

//start
_position = getPosATL _humanityTarget;
_tag = "Sign_sphere10cm_EP1" createVehicleLocal _position;
_tag attachTo [_humanityTarget,[0,1,0],"Head"];
titleText [format["You marked %1.", (name _humanityTarget)], "PLAIN DOWN"];
//end
};
Link to comment
Share on other sites

  • 0

any of this help? or give anyone a clue?

 

http://pastebin.com/uegk1pwC

http://pastebin.com/iV5sMfnq

https://github.com/vbawol/DayZ-Epoch/blob/master/Tools/Loot%20Position/MakeLootPos.Chernarus/Make_lootPos.sqf      ((this attaches the orb over loot im guessing to make it more visible, but its epoch coding, so maybe that will help someone))

Link to comment
Share on other sites

  • 0

ok after modifying the "player_updateGUI.sqf" file to add that block of code, im guessing i can put that anywhere in my mission or server pbo.  and then im guessing i edit the compiles file to point to the new player_udateGUI.sqf.  and thats it right?

Link to comment
Share on other sites

  • 0

This is what I've been trying to do. I want to be able to do something similar to this, however with the use of the Arma 2 OA Group System, much like how Wasteland does it.

 

Choose a player as the 'leader' and then set friendlies to join his group ? :  https://community.bistudio.com/wiki/join. Assigning an actual  leader is not necessary I believe, it may give him more command options, not tested.. Have only used this to get AI units to join a players group, effectively taking charge of them.

Link to comment
Share on other sites

  • 0

 

First lets try to make this as simple as possible. Maybe something like this.

 

Inside this block at player_updateGUI.sqf

if (!(_charID in _rfriendlyTo)) then {

_rfriendlyTo set [count _rfriendlyTo, _charID];
_humanityTarget setVariable ["friendlyTo", _rfriendlyTo, true];

//start
_position = getPosATL _humanityTarget;
_tag = "Sign_sphere10cm_EP1" createVehicleLocal _position;
_tag attachTo [_humanityTarget,[0,1,0],"Head"];
titleText [format["You marked %1.", (name _humanityTarget)], "PLAIN DOWN"];
//end
};

Ok i did it this way, it Worked, kinda.. the arrow was too far in front of the person. so i changed:

_tag attachTo [_humanityTarget,[0,1,0],"Head"];

to:

_tag attachTo [_humanityTarget,[0,0,0],"Head"];

and that worked fine.  Two little issues. Ok so when testing this i tagged a player as friendly, we got our arrows.   then i wanted to see if we became hostile towards eachother if the arrows would disappear.  so we shot each other in the foot.. the arrows stayed.. i changed the init file to false on friendly saving after the test.. havent tested since.. not sure if we would of actually killed eachother, then on respawn the tag would of still been active or not. 

 

second minor issue, when a person you tag gets in a vehicle, the arrow will stay at that point of entry.  even tho player has moved on.  once player exits, that old arrow disappears, and the new one is spawned.

 

 

Link to comment
Share on other sites

  • 0

 

 

Sorry if this is perhaps too dead of a post to reply to, but you could probably fix the vehicle thing with a loop. Also, on the attachTo issue. it's [x,y,z] x being north/south y being east/west and z being height. so if you want it above their head, it would be [0,0,1]. back to the loop, I would try something like

if (!(_charID in _rfriendlyTo)) then {

_rfriendlyTo set [count _rfriendlyTo, _charID];
_humanityTarget setVariable ["friendlyTo", _rfriendlyTo, true];

while {true} do {
//start
_position = getPosATL _humanityTarget;
_tag = "Sign_sphere10cm_EP1" createVehicleLocal _position;
_tag attachTo [_humanityTarget,[0,0,1],"Head"];
sleep 3;
deleteVehicle _tag;
};
titleText [format["You marked %1.", (name _humanityTarget)], "PLAIN DOWN"];
//end
};

so it continually creates, waits 3 seconds, then deletes the object, then re-creates it.

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
  • Discord

×
×
  • Create New...