Jump to content

Recommended Posts


http://i.imgur.com/8SkFChK.jpg (110 kB)
Moss Targets

Since there are no target scripts for Arma 3 other than the Una Targets for Arma 2 (that does not work in A3), I bring my own creation to the table for everyone.
This project is based on UNA targets idea, but built from scratch with Arma 3 scripting instead. His work inspired me to create my project and my targets may work the same way as his, but the scripting is completely different.
UNA Targets by Walker

A lot of groups and clans out there don't even have working targets to shoot at other than improvised pop up scripts. Thus during my time in my old community I tasked myself to create a proper target system with real score based on accuracy. This script was originally intended to be used with the pop up targets in game, but I changed it to sign targets when I remembered the UNA targets.

To those that know how UNA targets worked, they relied on coordinates from a vehicle that spawned where the bullet impacted, which greatly reduced the accuracy of the targets. My script uses target eventhandlers to convert the position hit into model space, which makes score calculation easy to count and for recalibrating for a different target. You can easily change any part of the scripts and targets to adapt to your shooting experience.
 

All future updates will be edited into this post.

Images:
http://i.imgur.com/nR3Ed84.jpg (221 kB)
http://i.imgur.com/vvPuhMi.jpg (291 kB)
http://i.imgur.com/d127xE9.jpg (390 kB)
http://i.imgur.com/0KwRMgb.jpg (177 kB)
http://i.imgur.com/LuGShnn.jpg (292 kB)
http://i.imgur.com/eAoEtPb.jpg (198 kB)

How to install:
  • Put the mission folder in your missions folder in your My Documents folder.
  • Open the editor in game and open the Moss_Targets mission.
  • Copy paste everything you need or rename the mission folder to begin your new adventure.
  • Make sure to bring the script files from the mission folder to the mission you're importing it to.
  • Edit the fn_MainInit.sqf in the scripts' folder to change settings for the scripts.
    There are a handful of different variables you can change to make the shooting range custom to your clan or mods.
  • To add or remove lanes, make sure the name of the logic and the target have 2 digit numbers ranged from 01 to 20+, and that they are synchronized.
  • All the names of the ranges is in the file "RangeNamesConfig.sqf". Here you can edit the name that shows up in game if you prefer a different language or style.
Features:
  • Multiple settings to set in the file fn_MainInit.sqf.
  • Easy to copy paste lane system that supports up to 20 unique lanes (And more).
  • Scripts are initialized through the logic of the lane that is synched with all the objects it needs.
  • Multiple targets per lane supported. (Use synchronization tool and make sure the targets' names follow the rules)
  • Practice shooting without score count.
  • Qualification shooting with score count.
  • Score count with bullet hit count and average score option.
  • Marker hit system for shooter and spotter (instructor).
  • Lane number signs (Inspired by USMC rifle ranges).
  • Sign with video feed of the target to see hit markers from shooting position.
  • Table with Rifle and a box with Magazines.
  • Markers and rulers in the editor to align the objects to your mission and map.
  • Register and unregister system for the shooters on the lanes.
  • Reset score function.
  • Variable of score is calculated and stored so that a hacker can't simply change his score (For whatever reason you may have a player doing that)
  • Photoshop original files to make more target pictures and range numbers.
  • Code has comments for all the script for easy editing.
  • Local variable and function handling. (Scripts should run locally and without lag)
Known issues:
  • Using BIS camera from the debug console will render the monitors black.
  • Score calculation is off by a hair on the target (due to image ratio versus texture of object ratio).
  • The monitor for the targets takes time to initialize and you can only use maximum 6.
  • Because of textures not being in .paa format, the player must walk up to the black replacement texture and load the textures in before it's visible at long range.
Limitations:
  • Camera monitor count is maximum 6.
  • Don't rush the actions on the signs.
Editing guidelines:
  • If you change any object the logic is synced to, make sure to change the type of object in the settings file.
    Because the script that initializes the objects and their script checks what type of object it is independent of the name of the object.
  • Scripts may seem difficult to understand, but know that the script is modular and can be copy pasted up to a hundred times.
    Thus a minimum amount of objects are named in the editor. Only the logic and the target has names because of the range name system and the camera monitor system for the targets. Make sure the names of the objects ends with a 2 digit number ranging from 01 to 20+.
  • Comments provided should be enough for you to edit the script yourself, but feel free to post a question below.
    I will do my best to answer them.
  • On the mission you will find markers with hints.
    Read them and then remove them.
  • If you have an improvement to the scripts, post it here and I will add it together with credits to you.
    There are certain things I haven't seen due to my lack of skill using pythagoras.
  • Changing target picture or scoring is a little bit tricky.
    Activate debug mode in the settings file and then shoot the target to get the debug info in game.
Frequently Asked Questions:
  • Why are the lane number textures not in .paa?
    Because the Level of Detail for the texture drops to a blurry 2x2 pixel image impossible to aim at, I use the JPEG which doesn't shrink.
    I've made several attempts using .paa and tried to limit the mipmap generation to 1, but then they just won't show up at long distances.
  • Why is the center of the table 3 instead of 10?
    Because you will never score a full set of 10s at 200 meter with ironsight and you would spend countless hours trying to combat the game's rifle movement. Unless you slap a RCO, remove rifle shake and go prone, your shots will not be forgiving. Thus the system of score is simplified to a more friendly standard where someone might actually be able to hit the target and score expert depending on rifle usage. The score board was originally intended to be used for table 1 and 2 based on the USMC rifle marksmanship qualification, but was changed after time to accommodate for the game's lack of accuracy. You can edit the target texture and scoring function yourself if you want to use a 10 point system, but I won't recommend it.
  • Why are the signs or targets black?
    Because of Arma engine's limitation of rendering JPEG files as textures in game, you need to approach the sign close enough until it changes.
  • There's no score count when I shoot.
    Register at the podium of the lane, then shoot, then check your score.
  • I can't use the lanes.
    You need to register or unregister from previous lane before using your lane.
  • The target monitor is bugged.
    Because it takes a lot of power for the engine to render the live texture, you are limited to using maximum 6. Also make sure that the logic and the targets have the same number in the name.
  • I get an error about unsynchronized objects.
    All objects related to the shooting need to by synchronized in the editor to the logic (the blue flag object). Copy paste the original mission file objects and don't remove the synchronization from the objects unless you know what you are doing.
  • How do I use more than 20 lanes?
    There are only 20 pictures for the lanes in the pics-folder. If you want to use more lanes you need to make yourself more pictures using the Photoshop template files you get with the project, or remove the User Texture objects in the editor.
Todo list:
  • Improve the range based on user input.
  • Get reports from people that have tested 15 or more players on a range.
  • Clean the code up for target score calculation is possible.
Download: https://dl.dropboxusercontent.com/u/28058839/Moss_Targets.zip
Contribute: Moss_Targest on Github
(Download temporary until I put it on Armaholic)

APL-SA.png

Usage request: Do not remove me as original creator of the content when using it in your missions or mods.
You may edit, improve and use the scripts under the Arma Public License

--------------------------

As a user, please comment with feedback for improvements.
If you want to share pictures, I'd love to see you and your friends shoot the targets.
If you have any questions, write them here and I will answer them and add them to the FAQ. Edited by mossarelli
  • Like 4

Share this post


Link to post
Share on other sites

Thanks for sending us your release :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Hey Moss, Congratulations and thank you for your release! We will be sure to test it out and give you feedback.

Share this post


Link to post
Share on other sites

Hi Moss, thanks for the release man. Always looking forward to your DLC reviews, they are brilliant. Hope everything works out with that job you had lined up with Bohemia :)

Share this post


Link to post
Share on other sites

Nice work, this is very usefull.

In my case, i can use maximum 8 PIP, not 6.

I have a suggestion. Could you make the PIP is only activated by a user action? Like set on a monitor. The PIP consume many FPS, and not always want to have-activated, especially if these limited. I created an academy mission for the group in my community, and we use 15 lanes. If I could turn on or off the PIP monitors, I could use according agree. Thanks

Share this post


Link to post
Share on other sites

Very cool has long been waiting for something like this to train my skillz... thanks a lot...!

Share this post


Link to post
Share on other sites

Have a bug when putting down a BIS Aresnal box, the two targets on the front of the range go black, and do not show my target score up close.

Share this post


Link to post
Share on other sites
...

Thank you for your help.

Hey Moss, Congratulations and thank you for your release! We will be sure to test it out and give you feedback.

It will surely come in handy for your table 1 and 2 so that your members can get some marksmanship.

Hi Moss, thanks for the release man. Always looking forward to your DLC reviews, they are brilliant. Hope everything works out with that job you had lined up with Bohemia :)

I had a dream about that yesterday funny enough. They had a small office and all their games was produced using a program. That was why it was so badly optimized. I ended up being the chief of the company and I made a game that was second to none.

Finally they are complete!

Like you were waiting for it anyway.

Nice work, this is very usefull.

In my case, i can use maximum 8 PIP, not 6.

I have a suggestion. Could you make the PIP is only activated by a user action? Like set on a monitor. The PIP consume many FPS, and not always want to have-activated, especially if these limited. I created an academy mission for the group in my community, and we use 15 lanes. If I could turn on or off the PIP monitors, I could use according agree. Thanks

The problem with the cameras are the naming. They have to be named rendertarget## and I had many issues trying to make it optimized. That's why I recommend only using them on some ranges to save both fps and lag.

I will see if I can make it an action with an activation and a deactivation.

Very cool has long been waiting for something like this to train my skillz... thanks a lot...!

That's why I made it.

Ill give them a go, thanks a lot.

You're welcome.

Have a bug when putting down a BIS Aresnal box, the two targets on the front of the range go black, and do not show my target score up close.

I haven't tried it with Arsenal Box but I will see what the error is.

Are you sure the error only appears when you use the box?

Share this post


Link to post
Share on other sites
Thank you for your help.

It will surely come in handy for your table 1 and 2 so that your members can get some marksmanship.

I had a dream about that yesterday funny enough. They had a small office and all their games was produced using a program. That was why it was so badly optimized. I ended up being the chief of the company and I made a game that was second to none.

Like you were waiting for it anyway.

The problem with the cameras are the naming. They have to be named rendertarget## and I had many issues trying to make it optimized. That's why I recommend only using them on some ranges to save both fps and lag.

I will see if I can make it an action with an activation and a deactivation.

That's why I made it.

You're welcome.

I haven't tried it with Arsenal Box but I will see what the error is.

Are you sure the error only appears when you use the box?

Yes, I tried to load a loadout with arsenal and the two front targets go black.

Share this post


Link to post
Share on other sites
Yes, I tried to load a loadout with arsenal and the two front targets go black.

Oh the arsenal box. Yeah it's the same glitch as the BIS camera from the developer console.

When I implement the camera control on the sign, you will be able to just restart the cameras after using the arsenal box. This is a known problem.

Share this post


Link to post
Share on other sites

Ive also had the glitch when I add another player it says to sync all objects to logic and then all the targets and all functionality of the mission is gone

Share this post


Link to post
Share on other sites

It's so strange, I actually managed to get the UNA Targets to work in Arma 3 just recently, now I may not need them at all!

Share this post


Link to post
Share on other sites
It's so strange, I actually managed to get the UNA Targets to work in Arma 3 just recently, now I may not need them at all!

As stated in the description, UNA targets are very inaccurate. You'll be happy with my targets and how accurate they are.

Share this post


Link to post
Share on other sites

About accuracy, would it be possible instead of those yellow spheres use texture and make those like this (imo using textures is only way to get sub-moa readings. SMA Showcase shooting range does excellent job, but its almost unusable anywhere else). Also cameras are resource hungry - my fps gone from 55-60 to 15-20.

Edited by nsnipe

Share this post


Link to post
Share on other sites

I'm getting this issue where the map works when I host a local server, but when I put it on a dedicated server I get this error:

http://cloud-4.steamusercontent.com/ugc/38614507771007363/80CD142FE29F3F2740F7C1892849D44BC4AC497C/1024x576.resizedimage (108 kB)

Any solutions or ideas why it's doing this?

PS.: I'm using the provided map, haven't changed a thing.

PSS.: Just found that only people who load in to the server on first launch experience this issue, reconnecting gets rid of the problem, well, it fixes it at least.

Edited by Spookeh

Share this post


Link to post
Share on other sites
About accuracy, would it be possible instead of those yellow spheres use texture and make those like this (imo using textures is only way to get sub-moa readings. SMA Showcase shooting range does excellent job, but its almost unusable anywhere else). Also cameras are resource hungry - my fps gone from 55-60 to 15-20.

I've tried using textures instead of the 3D-sphere ball as hit indicator, but it just doesn't show up over that distance. The sphere is visible up to 500m with ease.

I can recolor them to screaming green but I can't make the texture of the target change based on the hits or change the hit sprite.

I'm getting this issue where the map works when I host a local server, but when I put it on a dedicated server I get this error:

http://cloud-4.steamusercontent.com/ugc/38614507771007363/80CD142FE29F3F2740F7C1892849D44BC4AC497C/1024x576.resizedimage (108 kB)

Any solutions or ideas why it's doing this?

PS.: I'm using the provided map, haven't changed a thing.

PSS.: Just found that only people who load in to the server on first launch experience this issue, reconnecting gets rid of the problem, well, it fixes it at least.

This is a known issue that I've had since 9 months ago where something loads perfectly fine in singleplayer and local multiplayer, but on a dedicated server, the JIP becomes the correct way to launch the mission and the map starter gets hundreds of issues. I can tell you already that the rifles will not be placed on the tables correctly due to this bug unless a you join as a JIP and then everything works fine.

I've had this issue with a bootcamp mission I ran in a group in the past, where computers would not stick to tables due to the enablesimulation false command and due to computers falling straight through tables when trying to attach them. AttackTo doesn't work either, so one needs to use model to world and model to space commands to put them there.

I'll see if I can get a fix for what you are experiencing.

Share this post


Link to post
Share on other sites

Really nice work. I support the idea of enabling/disabling the monitors via user action to save FPS and also to avoid the issue with the Virtual Arsenal. Imho the 3D sphere as hit-indicator is good. This way one can at least see clearly where the bullet hit, in comparison to many other scripts which make the shooter wild guessing where/if he actually hit.

Share this post


Link to post
Share on other sites
I'll see if I can get a fix for what you are experiencing.

Nice mate, for now the issue has an easy work around, so I'm thoroughly enjoying your template as is! But improvements are almost always better right? ;) Thanks for the template regardless!

Share this post


Link to post
Share on other sites
Nice mate, for now the issue has an easy work around, so I'm thoroughly enjoying your template as is! But improvements are almost always better right? ;) Thanks for the template regardless!

PLz do tell... i cant make it work on dedicated server

Share this post


Link to post
Share on other sites
PLz do tell... i cant make it work on dedicated server

This is due to a error that I've had with Arma 3 since 2 years back.

You start the mission on a dedicated server and get some kind of error message saying that something is missing or textures are out of place.

Then the mission has to be restarted.

Then you start the mission up and get in, all the stuff you attach to tables or objects are misaligned or not attached.

So after the dedicated server and the mission is running, you need to go back to the lobby and then join in as a join in progress.

Alternatively: You need to run a script that fixes all the issues when you're not JIP.

This is a known problem for everyone that runs mods and BIS should know about it too.

For me, it's been trial and error from day one. There's not a single line on the wikipedia about it.

Share this post


Link to post
Share on other sites

Thanks for making this, it is very handy.

Your score calculation is doing some unnecessary work:

if (_bulletFromCenter > 0) then //The first one in the list is the center hit.
{
   _bulletscore = 3;
};
//To add more scores, just calibrate the new target by shooting at it with the DEBUG variable set to true, then input the new distance from center value here and then edit the score to what you want.
if (_bulletFromCenter > 17) then
{
   _bulletscore = 2;
};
if (_bulletFromCenter > 31) then
{
   _bulletscore = 1;
};
if (_bulletFromCenter > 48) then //Last check is outside the whole area which is counted as zero points. It's used for hitting the rim, the legs or the big white area outside the circle.
{
   _bulletscore = 0;
};

If _bulletFromCenter = 50, for example, it will execute all if statements in order, so _bulletScore will be set to 3, then 2, then 1 and finally the correct 0.

You could possibly refactor it like this:

//Is outside the whole area which is counted as zero points. It's used for hitting the rim, the legs or the big white area outside the circle.
if (_bulletFromCenter > 48) then {
   _bulletscore = 0;
}
//To add more scores, just calibrate the new target by shooting at it with the DEBUG variable set to true, then input the new distance from center value here and then edit the score to what you want
else { if (_bulletFromCenter > 31) then {
   _bulletscore = 1;
}
else { if (_bulletFromCenter > 17) then {
   _bulletscore = 2;
}
//Center of target
else {
   _bulletscore = 3;
}}};

Due to SQF's lack of an else-if structure, it is arguably messier, but it is still readable and won't execute all the statements every time.

Share this post


Link to post
Share on other sites

Yeah, I'd like to use a switch statement really but I don't know if it can be used for this.

I'll implement your code but I'll see about making it even more smooth.

Share this post


Link to post
Share on other sites
Yeah, I'd like to use a switch statement really but I don't know if it can be used for this.

You can in a roundabout way, using constant intervals. But it's not very readable.

_interval = 16;
_range = _bulletFromCenter / _interval
switch (_range) do {
//0 to 15
case 0: {
	_bulletscore = 3;
};
//16 to 31
case 1: {
	_bulletscore = 2;
};
//32 to 47 
case 2: {
	_bulletscore = 1;
};
//48+
default {
	_bulletscore = 0;
};
};  

In the register shooter function, you might like to move the line

//Reset score.
player setVariable ["MossShooterScoreInfo",[player],false];

below the check for already being registered, as otherwise attempting to register at another lane will reset the score.

Edited by AdrianR

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×