Jump to content
Sign in to follow this  
Walker001

UNA Targets - Realistict target board script

Recommended Posts

I love your script Walker. I do not know that much about scripting but I am trying to get the addactions to appear on an object by the firing stand. Is there anyway I can do this or would the script have to be completely re written with the objects names in it?.

I named the target T1 and trying to add the addaction to object "stand1"

Share this post


Link to post
Share on other sites
I love your script Walker. I do not know that much about scripting but I am trying to get the addactions to appear on an object by the firing stand. Is there anyway I can do this or would the script have to be completely re written with the objects names in it?.

I named the target T1 and trying to add the addaction to object "stand1"

Im glad you like the script.

It should be fairly easy to modify the script so the action at an other object than the target, and since this extension has been requested by many others aswell, i will make this possible in the next update of the script.

If you like to try to modify this yourself, you should check out lines 53 to 56 in the init_target.sqf. This is where the action is updated for the target. This is however at your own risk. :)

Edited by Walker001

Share this post


Link to post
Share on other sites

Thanks Walker. I will wait for next updated. I broke it when I tried to mess with it.

Share this post


Link to post
Share on other sites

shit! i have problems with your script!

i can only 'cleare score' one times! the script works not longer!

only one time, no more!

this is in my mission and in your tamplate!

pls help!

Share this post


Link to post
Share on other sites

I had the same problem, after clearing the targets the action menu entries were gone!

But that was for a reason! I just had to shoot it again and then the actionmenu appeared again.

Share this post


Link to post
Share on other sites

I have an Idea! Is i tpossible to make ability to check scores from distance but only when you look at the target through binoculars? That would be awesome.

Share this post


Link to post
Share on other sites
Make sure you gave put the una_targets folder into the folder of your current mission (not for example ArmA 2\missions). This folder you find in "My Documents", for example C:\Documents And Settings\Username\ArmA\Missions\your_mission.Desert_E.

:confused:Hey i am Using Vista so where do i put the folder cause i am getting that text 2:confused::confused:

Share this post


Link to post
Share on other sites

Folks,

I reviewed and tested the code, and found the reason why it wasn´t working after the first "Clear Target".

I don´t know how and why, but the first time I tried the script it worked fine. Months later, I tried it again and it just worked normally until the first "Clear target" action. then it became not registering shots anymore.

I just added two lines, now it works fine again.

Here are the two lines added in file init_target.sqf to fix the problem:

"

//if target has been cleared

if (WALK_TARGET_PUBVAR == _target) then {

_scoretable = null; //[COMBAT]Geo line added

_scoretable = [];

_score_table_count_before = 0; //[COMBAT]Geo line added

WALK_TARGET_PUBVAR = null;

publicVariable "WALK_TARGET_PUBVAR";

_target removeAction _action_cs;

//_action_cs = _target addaction ["Check scores", _path + "check_target.sqf",_scoretable];

_target removeAction _action_ct;

};

"

Thanks

[COMBAT]Geo

Share this post


Link to post
Share on other sites

Thanks man, would love to see this working,

... but I tried your version and had the same thing happen. The target only worked for one use. After clearing the target, it no longer functioned. This was in an offline test, didn't take it to dedicated yet. Just fyi.

Share this post


Link to post
Share on other sites

It's quite a while since I released the UNA targets. Thanx for all the feedback, and sorry if I haven't had the time to answer you all. Apparently some people have had some problems with the script working after clearing the targets. [COMBAT]Geo however might have found a solution for it. I don't have this problem on my system so I can not test it. I have included this fix in a new update of UNA Targets. I decided to at the same time fulfill some of the request I have received. For example now you it is possible for the mission designer to allow the players to check the score without having to move to the targets. The script should also be backward compatible with v0.8. If you find any problems with the new update, please let me know.

So what is new in v0.9?

- Clear script hotfix by [COMBAT]Geo, tnx

- New parameter, _monitor, allows the player to check the score from a different object than the target.

- New parameter, _target_name, allows the mission designer to assign names to the target that will be visible in the GUI.

- GUI updated.

- New example mission for OA.

Download:

UNA Targets v0.9

Edited by Walker001

Share this post


Link to post
Share on other sites

I already figured it out.

Mods are making the original version to not work properly. If you remove all mods, it´ll work fine. I´m currently working in a fixed version for using the script with mods. As soon as I finish it, I´ll post it here.

Share this post


Link to post
Share on other sites

This mod needs a good single player mission.

Like "A day at the shooting range" or something. Something lazy people like myself :) can just pop in the mission folder and play while getting some atmosphere from the mission maker. Similar to the "home airport base" in BAF dlc.

Share this post


Link to post
Share on other sites

Nice script thanks for making and sharing!

/KC

Share this post


Link to post
Share on other sites
I already figured it out.

Mods are making the original version to not work properly. If you remove all mods, it´ll work fine. I´m currently working in a fixed version for using the script with mods. As soon as I finish it, I´ll post it here.

That's good news, because I also have this problem with 0.9

THX Walker001 for the nice script. I also like the new "check from a distance" methode. That's far more realistic than teleporting around like Captain Kirk. ;)

Share this post


Link to post
Share on other sites

I'm having some issues with this script in a training mission. It works perfectly until you try to clear a target after shooting at it a couple of times. As soon as you hit that it throws an error

Error in expression <scoretable;
};
if (WALK_TARGET_PUBVAR == _target) then { _scoretable = null; >
 Error position: <== _target) then { _scoretable = null; >
 Error ==: Type Script, expected Number,String,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location

it is version 0.9v

Share this post


Link to post
Share on other sites

I'm trying to use this in the beginning of a mission. How would I set this up so when the player "Inspects target" and if the total score is over a number, say 30, than a trigger would go off and the objective is complete. I basically want a player to dial in his scope for a sniping mission and when he gets a certain score it's on to the next objective.

I see that the variable is _totalscore but if I make a trigger with a condition of:

_totalscore = 30

and an Onact of:

hint "Complete";

nothing happens. The simple hint never goes off. How would I pass the total score variable to the trigger? I'm assuming this would be possible. My scripting skills just aren't good enough yet.

Share this post


Link to post
Share on other sites
Thank you very much! Excellent script! Just for the needs of my squad. We practice realistic combat and training and your script will definitely be included.

One more thing which is needed badly, is the same thing, but with a human target, like those in America's Army. It's subdivided in arm, center of mass, head etc. sectors. It would be fantastic to have the same script, but when you come close and check results it will say: You hit: left arm, torso, center of mass, head... I believe the same scripting will do but we need to develop a system which detects certain coordinates as body parts...

Yeah I would really like a human target but I think a simple scoring system like this would work better.

For example

http://www.caelyntek.com/airsoft/articles/TAPSS/TAPSStarget.jpg

Share this post


Link to post
Share on other sites

This is great Ive used it in the past and some today. Haven't had any competitions as of yet but maybe soon. I just wanted to report however that your included new demo mission may be broken somehow. In that even on Desert I still have to walk to the target to check score and the editor doesnt show you added an action to anything near the shooters location. I wanted to add the addaction Check score to an object and used your Syntax snippet and I am getting frustrated with the editor because its saying first Local variable in global space then I get rid of the underscores in front of everything and it tells me Type of script expected nothing or something like that.There was another guy who recently did a GUN RANGE scripted Single/Multiplayer mission at Chernarus Main Airport and it allows change of target distance,type,Moving or still options as well as some other settings its fun but Not very realistic, though it does make for a great Practice tool it only says if you hit not a score based on where you hit This script seems much more in depth for Target Info however maybe you can get some Ideas from his on how to do some other things you want to add. I have to say,I have seen several mentions of targets may I suggest the light blue and white silhouette Targets they use at Quantico. And of course if your willing to go all out the new Zombie Targets would add a nice touch hehe. I wonder also if theres a way to get the Neon shot Dots so you can see where you hit before you check score.Hope to see an Update Keep up the Great work man.

Share this post


Link to post
Share on other sites
I'm having some issues with this script in a training mission. It works perfectly until you try to clear a target after shooting at it a couple of times. As soon as you hit that it throws an error

Error in expression <scoretable;
};
if (WALK_TARGET_PUBVAR == _target) then { _scoretable = null; >
 Error position: <== _target) then { _scoretable = null; >
 Error ==: Type Script, expected Number,String,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location

it is version 0.9v

I am getting the same error as soon as I load a mission with this in it. Anyone got a fix for it? It used to work fine before, it would be a shame if I cannot use this any more as its ideal for what I need.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×