Jump to content

[Working] Adding a Visual marker to friendly tagged players


Recommended Posts

This thread started in scripting help and with Sukkaeds help, its working.

 

 

seeker619

Posted 01 April 2014 - 02:51 PM

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.

 

 

Sukkaed, on 02 Apr 2014 - 03:39 AM, said:

 

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_arrow_down_large_EP1" createVehicleLocal _position;
_tag attachTo [_humanityTarget,[0,1,0],"Head"];
titleText [format["You marked %1.", (name _humanityTarget)], "PLAIN DOWN"];
//end
};

That worked, except the arrow wasnt exactly above the persons head, it was above and in front. but this fixes that:

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

INSTALLING IT:

 

go to C:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\@dayz\   

or wherever you have it installed at and extract the dayz_code.pbo

 

copy player_updateGUI.sqf, from \dayz_code\compile\

 

Save to a folder called "custom" inside your dayz_mission.pbo

 

copy compiles.sqf from \dayz_code\init

 

Save to a folder called "custom" inside your dayz_mission.pbo (if you already have a custom compiles file in your mission pbo skip this)

 

open player_updateGUI.sqf inside your "custom" folder and look around line 163 for

if (!(_charID in _rfriendlyTo)) then {
// diag_log format["IS FRIENDLY: %1", _player];

_rfriendlyTo set [count _rfriendlyTo, _charID];
_humanityTarget setVariable ["friendlyTo", _rfriendlyTo, true]; 
               
// titleText [format[(localize "STR_EPOCH_ACTIONS_17"), (name _humanityTarget)], "PLAIN DOWN"];

change all that to:

if (!(_charID in _rfriendlyTo)) then {
// diag_log format["IS FRIENDLY: %1", _player];

_rfriendlyTo set [count _rfriendlyTo, _charID];
_humanityTarget setVariable ["friendlyTo", _rfriendlyTo, true];
//start
_position = getPosATL _humanityTarget;
_tag = "Sign_arrow_down_large_EP1" createVehicleLocal _position;
_tag attachTo [_humanityTarget,[0,0,0],"Head"];
titleText [format["You marked %1.", (name _humanityTarget)], "PLAIN DOWN"];
//end
};

Save it.

open your compiles.sqf and change

player_updateGui = compile preprocessFileLineNumbers "\dayz_code\compile\player_updateGui.sqf";

To:

player_updateGui = compile preprocessFileLineNumbers "custom\player_updateGui.sqf";

open up your init.sqf and change the compiles line to:

call compile preprocessFileLineNumbers "custom\compiles.sqf";				//Compile regular functions

repack and upload. :)

Edited by seeker619
Link to comment
Share on other sites

This is a very neat script but the orb is still not above the players head on my server... I did use the 0,0,0.....

 

Also is there any way to increase the range of this and/or put a name over their head?  After ~120 meters this orb disappears, which makes it kind of useless if you're trying to keep track of other team members over several hundred meters.

 

I saw the thread about the radio name tags but Id rather not mess around with the antihack to get it to work properly.

Link to comment
Share on other sites

This is a very neat script but the orb is still not above the players head on my server... I did use the 0,0,0.....

 

Also is there any way to increase the range of this and/or put a name over their head?  After ~120 meters this orb disappears, which makes it kind of useless if you're trying to keep track of other team members over several hundred meters.

 

I saw the thread about the radio name tags but Id rather not mess around with the antihack to get it to work properly.

My bad, in one of my original posts i talk about how the orb is attached to the wrist, and its so small and useless, so i changed it to:

_tag = "Sign_arrow_down_large_EP1" createVehicleLocal _position;

You can literally change that to whatever you want,  If you want those freaking POW flags attached to someone you can. you just the item ID.  here a list of some of the plausible choices.

  • Sign_circle_EP1
  • Sign_sphere10cm_EP1
  • Sign_sphere25cm_EP1
  • Sign_sphere100cm_EP1
  • Sign_arrow_down_EP1
  • Sign_arrow_down_large_EP1
Link to comment
Share on other sites

  After ~120 meters this orb disappears, which makes it kind of useless if you're trying to keep track of other team members over several hundred meters.

Hmmm, never tested distances and their effects on the marker..

Link to comment
Share on other sites

 

My bad, in one of my original posts i talk about how the orb is attached to the wrist, and its so small and useless, so i changed it to:

_tag = "Sign_arrow_down_large_EP1" createVehicleLocal _position;

You can literally change that to whatever you want,  If you want those freaking POW flags attached to someone you can. you just the item ID.  here a list of some of the plausible choices.

  • Sign_circle_EP1
  • Sign_sphere10cm_EP1
  • Sign_sphere25cm_EP1
  • Sign_sphere100cm_EP1
  • Sign_arrow_down_EP1
  • Sign_arrow_down_large_EP1

 

You know I really didnt think of that for some reason. Gonna give that a shot and see what its like. The orb is just too small and hard to see from even closeby depending on the back drop. Also you need line of sight with it so trees easily blocked it.

Link to comment
Share on other sites

You know I really didnt think of that for some reason. Gonna give that a shot and see what its like. The orb is just too small and hard to see from even closeby depending on the back drop. Also you need line of sight with it so trees easily blocked it.

Guarantee there is no missing the Sign_arrow_down_large_EP1.  I wanted to attach a glowstick to see how visible it was at a distance.. above the head.. never got around to it.

 

 

btw, im sure this can be tweeked to attach more then one thing at the same time.. a glow stick on each hand, 1 on each foot.. i dont know.. just an after thought.

Edited by seeker619
Link to comment
Share on other sites

in admintools i have file espplayers.sqf with this script. I can see all players around me and how much meters from me so maybe somehow can use this script for friendly tag.

 

 

 

playerESP = _this select 0;
 
setGroupIconsVisible [true, true];
_color_green = [0,1,0,1];
_color_blue = [0,0,1,1];
_color_white = [1, 1, 1, 1];
_color_orange = [1,0.3,0,1];
_color_red = [1,0,0,1];
 
if (!("ItemGPS" in items player)) then {player addweapon "ItemGPS";};
 
while {playerESP} do
{
{
if (vehicle _x == _x) then 
{
clearGroupIcons group _x;
group _x addGroupIcon ["x_art"];
 
if ((side _x == side player) && (side player != resistance)) then 
{
group _x setGroupIconParams [_color_red, format ["[%1]-[%2m]",name _x,round(_x distance player)], 0.5, true];
else 
{
group _x setGroupIconParams [_color_orange, format ["[%1]-[%2m]",name _x,round(_x distance player)], 0.5, true];
};
}
else
{
clearGroupIcons group _x;
group _x addGroupIcon ["x_art"];
 
if ((side _x == side player) && (side player != resistance)) then 
{
_vehname = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle _x) >> 'displayName'));
_crew = (name (crew (vehicle _x) select 0));
_crew2 = ", "+(name (crew (vehicle _x) select 1));
_crew3 = ", "+(name (crew (vehicle _x) select 2));
_crew4 = ", "+(name (crew (vehicle _x) select 3));
_crew5 = ", "+(name (crew (vehicle _x) select 4));
_crew6 = ", "+(name (crew (vehicle _x) select 5));
_crew7 = ", "+(name (crew (vehicle _x) select 6));
_crew8 = ", "+(name (crew (vehicle _x) select 7));
_crew9 = ", "+(name (crew (vehicle _x) select 8));
_crew10 = ", "+(name (crew (vehicle _x) select 9));
group _x setGroupIconParams [_color_blue, format ["[%2]-[%3%4%5%6%7%8%9%10%11]-[%1m]",round(_x distance player),_vehname,_crew,_crew2,_crew3,_crew4,_crew5,_crew6,_crew7,_crew8,_crew9,_crew10], 0.5, true];
else 
{
_vehname = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle _x) >> 'displayName'));
_crew = (name (crew (vehicle _x) select 0));
_crew2 = ", "+(name (crew (vehicle _x) select 1));
_crew3 = ", "+(name (crew (vehicle _x) select 2));
_crew4 = ", "+(name (crew (vehicle _x) select 3));
_crew5 = ", "+(name (crew (vehicle _x) select 4));
_crew6 = ", "+(name (crew (vehicle _x) select 5));
_crew7 = ", "+(name (crew (vehicle _x) select 6));
_crew8 = ", "+(name (crew (vehicle _x) select 7));
_crew9 = ", "+(name (crew (vehicle _x) select 8));
_crew10 = ", "+(name (crew (vehicle _x) select 9));
group _x setGroupIconParams [_color_red, format ["[%2]-[%3%4%5%6%7%8%9%10%11]-[%1m]",round(_x distance player),_vehname,_crew,_crew2,_crew3,_crew4,_crew5,_crew6,_crew7,_crew8,_crew9,_crew10], 0.5, true];
};
};
} forEach playableUnits;
sleep 1;
};
{clearGroupIcons group _x;} forEach playableUnits;
Link to comment
Share on other sites

yea that would be really cool, very similar to ESP but only with people tagged friendly.

Maybe if I close my eyes, click my heels together and say, " Theres no scripter like infiSTAR, there's no scripter like infiSTAR, there's no scripter like infiSTAR!" (you have to say it 3 times or it definitely wont work), infiSTAR will pop up with a script ready to go! lol

Link to comment
Share on other sites

yea that would be really cool, very similar to ESP but only with people tagged friendly.

Maybe if I close my eyes, click my heels together and say, " Theres no scripter like infiSTAR, there's no scripter like infiSTAR, there's no scripter like infiSTAR!" (you have to say it 3 times or it definitely wont work), infiSTAR will pop up with a script ready to go! lol

 

Yep, i was trying to do something with this script but lol, i dont know how to do this,

 

b_560_95_1.png

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...