legolasindar 3 Posted October 25, 2014 Hi, i need an script show the hits in the targets. I search from armaholic, google, bis forum, but I did not find what I'm looking for. Im looking this, minut 4:20. Anyone can help me? I have no programming knowledges, I need a script already created, you only need to configure. Thanks. Share this post Link to post Share on other sites
jshock 513 Posted October 25, 2014 I may have something for you, but I don't have access to my computer atm, so give me a few hours and I can get it too you. Share this post Link to post Share on other sites
legolasindar 3 Posted October 26, 2014 I may have something for you, but I don't have access to my computer atm, so give me a few hours and I can get it too you. Ok thanks. Share this post Link to post Share on other sites
legolasindar 3 Posted October 28, 2014 Any new of you JShock? Share this post Link to post Share on other sites
Von Quest 1163 Posted October 28, 2014 My Sniper Mod project has Target feedback. Not sure if it will work on your screen resolution. I have custom Target, Data Card, Weather Meter, etc. Use my Target and grab the Logbook out of my crate. You need that on you to get the Target feedback to work. I also have an Editor mission to test and practice with included as well. Share this post Link to post Share on other sites
jshock 513 Posted October 28, 2014 Any new of you JShock? Shit sorry man, got busy, here it is, put it in the init field of the target: this addEventHandler ["HitPart", {_spr = "Sign_Sphere10cm_F" createVehicle [0,0,0]; _spr setPosASL (_this select 0 select 3); _shooter = _this select 0 select 1; _temp = _shooter getVariable ["hitMarkers",[]]; _temp set [count _temp, _spr]; _shooter setVariable ["hitMarkers",_temp];}]; And then if you want to delete them (the red globes are seen globally, but can only be deleted locally by the shooter themselves): Put this on an object (we used a laptop): this addaction ["Reset Markers",{{ deleteVehicle _x; }foreach (player getvariable ["hitMarkers",[]])},0,0,true,true,"","_target distance _this < 3"]; You may be able to make it a global reset of the marked targets with a little work, but eh, this is what I have :p. Share this post Link to post Share on other sites
legolasindar 3 Posted October 28, 2014 My Sniper Mod project has Target feedback. Not sure if it will work on your screen resolution. I have custom Target, Data Card, Weather Meter, etc.Use my Target and grab the Logbook out of my crate. You need that on you to get the Target feedback to work. I also have an Editor mission to test and practice with included as well. Thanks, i try you script, but my programming knowledges is zero. I understand i not need you mod for use this function. Shit sorry man, got busy, here it is, put it in the init field of the target: this addEventHandler ["HitPart", {_spr = "Sign_Sphere10cm_F" createVehicle [0,0,0]; _spr setPosASL (_this select 0 select 3); _shooter = _this select 0 select 1; _temp = _shooter getVariable ["hitMarkers",[]]; _temp set [count _temp, _spr]; _shooter setVariable ["hitMarkers",_temp];}]; And then if you want to delete them (the red globes are seen globally, but can only be deleted locally by the shooter themselves): Put this on an object (we used a laptop): this addaction ["Reset Markers",{{ deleteVehicle _x; }foreach (player getvariable ["hitMarkers",[]])},0,0,true,true,"","_target distance _this < 3"]; You may be able to make it a global reset of the marked targets with a little work, but eh, this is what I have :p. Well, this is not exactly i need, but thanks, i try to use this if i not found nothing better :rolleyes: Share this post Link to post Share on other sites
jshock 513 Posted October 28, 2014 Well, what exactly are you looking for, you said: an script show the hits in the targets And that's what my code does for you, unless I miss understood what you meant by "show hits on targets". Share this post Link to post Share on other sites
legolasindar 3 Posted October 29, 2014 If you look the video in the first post at 4:20 minut, you can see exactly what i search ;) Share this post Link to post Share on other sites
boydee 10 Posted October 30, 2014 Shit sorry man, got busy, here it is, put it in the init field of the target: this addEventHandler ["HitPart", {_spr = "Sign_Sphere10cm_F" createVehicle [0,0,0]; _spr setPosASL (_this select 0 select 3); _shooter = _this select 0 select 1; _temp = _shooter getVariable ["hitMarkers",[]]; _temp set [count _temp, _spr]; _shooter setVariable ["hitMarkers",_temp];}]; And then if you want to delete them (the red globes are seen globally, but can only be deleted locally by the shooter themselves): Put this on an object (we used a laptop): this addaction ["Reset Markers",{{ deleteVehicle _x; }foreach (player getvariable ["hitMarkers",[]])},0,0,true,true,"","_target distance _this < 3"]; You may be able to make it a global reset of the marked targets with a little work, but eh, this is what I have :p. This is pretty cool dude I'm going to use this in a training mission. Thanks!! Share this post Link to post Share on other sites
jshock 513 Posted October 30, 2014 (edited) This is pretty cool dude I'm going to use this in a training mission. Thanks!! Thanks, we used it for our training map as well, was nice to get some visual feedback on target. @Legolasindar: I see what you mean now, but that is a GUI, which is a bit out of my expertise, sorry. That being said, however, I wouldn't know how to interface it to the GUI, but you would still use the same basic concept as you see in my example, using the "HitPart" event handler, but instead of creating an object on that spot, you would just need to pass those variables into the GUI, however that's done :p. Edited October 30, 2014 by JShock Share this post Link to post Share on other sites
Hobo56 10 Posted April 28, 2015 Shit sorry man, got busy, here it is, put it in the init field of the target: this addEventHandler ["HitPart", {_spr = "Sign_Sphere10cm_F" createVehicle [0,0,0]; _spr setPosASL (_this select 0 select 3); _shooter = _this select 0 select 1; _temp = _shooter getVariable ["hitMarkers",[]]; _temp set [count _temp, _spr]; _shooter setVariable ["hitMarkers",_temp];}]; And then if you want to delete them (the red globes are seen globally, but can only be deleted locally by the shooter themselves): Put this on an object (we used a laptop): this addaction ["Reset Markers",{{ deleteVehicle _x; }foreach (player getvariable ["hitMarkers",[]])},0,0,true,true,"","_target distance _this < 3"]; You may be able to make it a global reset of the marked targets with a little work, but eh, this is what I have :p. How works it for a 2. / 3. etc. target? Share this post Link to post Share on other sites
jshock 513 Posted April 28, 2015 How works it for a 2. / 3. etc. target? Same as the 1st, just paste into the init field of the target(s) you want to have this feature. The addAction really only needs to be put in one place as it is ran locally on a set variable array of the objects spawned to mark the hits. Share this post Link to post Share on other sites
Hobo56 10 Posted April 28, 2015 (edited) Same as the 1st, just paste into the init field of the target(s) you want to have this feature. The addAction really only needs to be put in one place as it is ran locally on a set variable array of the objects spawned to mark the hits. Ok. But i deleate all target marker at the same time. How can I deleate each target marker on Lane 1 and on Lane 2 later? (Sorry for my bad English!) Edited April 28, 2015 by Hobo56 Share this post Link to post Share on other sites
jshock 513 Posted April 28, 2015 Ok. But i deleate all target marker at the same time. How can I deleate each target marker single? (Sorry for my bad English!) Ah, ok, so in the EH code where you see the "hitMarkers", change each of those each time (new name, i.e. "hitMarkers2") you have a new target (or a new lane of targets) that contributes, then on the addAction match the same variable name as the target/lane of targets and that should do it. Share this post Link to post Share on other sites
Hobo56 10 Posted April 29, 2015 BIG THX JShok :bounce3: Share this post Link to post Share on other sites
dream1979 0 Posted March 17, 2016 Hello, unfortunately I can't start my own topic yet, so I will try to attach my question here as it is also about hit indication. In my sniper range I use TargetBootcampHuman_F as Targets.If you approach one of those targes you can interact and it gives you the ammount of hits and the range.What I would like to do, is to have one TargetBootcampHuman_F or any other oject, if possible, at my shooters possition which then would show the hits from all the other TargetBootcampHuman_F So basically all TargetBootcampHuman_F in the range would have to copy their statistic to one other. Would that be possible and how?Thank youPeter ---- Solutionadd the following function to the object that is supposed to display the date: this addAction ["Target 1", "['uiOpen', [Target_T1]] call BIS_fnc_target"]; this addAction ["Target 2", "['uiOpen', [Target_T2]] call BIS_fnc_target"]; this addAction ["Target 3", "['uiOpen', [Target_T3]] call BIS_fnc_target"]; this addAction ["Target 4", "['uiOpen', [Target_T4]] call BIS_fnc_target"]; but I'm still looking for a solution to list all targets from one range in one display. Share this post Link to post Share on other sites