Jump to content
  • 0
seeker619

Adding A Visual Marker On Friendly Tagged Players

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"];
      };
    };
};

Share this post


Link to post
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
};

Share this post


Link to post
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.

Share this post


Link to post
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))

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
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.

 

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By THAC0_Gewch
      https://github.com/OlofTheBald/DayZ-Humanity-Loadout-Granter/tree/Epoch_1.0.5.1
       
      Updated for 1.0.6.x
    • By THAC0_Gewch
      Many years ago, I made a Humanity Loadout script for 1.0.5.x. The script is basic, it checks your players' humanity and grants a pre-set loadout when they spawn depending on their humanity level.
      I've now updated and optimized this script for 1.0.6.x:
      https://github.com/OlofTheBald/DayZ-Humanity-Loadout-Granter
       
       
    • By Dzhabrailov
      how to do it humanity for animals killed ?
    • By webbie
      Hey all, trying to track down the code that determines what the multigun Vehicle attachment will fix. Here is why. A player of mine noticed that the vtols can not be repaired. After some testing on both the epoch and vanilla variant I couldn't get either to work and actually found I couldn't do much with repair on them at all, I'm wondering if this is the same as the Hitpoint issue???
      As always thx in advance for any help or suggestions, always appreciated :)
    • By calinova22
      I was wondering if it is possible to make it so that a players humanity would not change for a certain amount of time? I have a PVP arena with a teleport in and I was wanting to make it so people could TP in and fight without worrying about gaining or losing humanity.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...