Jump to content
Sign in to follow this  
KC Grimes

Pop-Up Targets (Firing Range)

Recommended Posts

I hate to revive old threads but due to the limitations of ArmA2 the 3rd Marine Division cannot follow the USMC standard for rifle qualifications. After discussion on the issue we have decided that following the common Army BRM qualification standard would be most appropriate. What I need is a script kinda like the ones in this thread but that meets these requirements. The 3rd Marine Division will provide a financial (money) contribution a individual who can do this.

Currently we have the range setup with 7 pop-up targets, 2 at 50m (one left and one right), and then 1 target at each 50 meter interval that are mostly centered and staggered. I need a script that can be activated by a instructor at a location, maybe by having a object with a init line that says (Start Lane 1, Start Lane 2). Maybe having a copy of the script for the second lane but a object that can have a variable that allows a scroll wheel option to start each as stated above.

I then need the sequence of targets to follow a set order, and since it would make it easier, here is the sequence I need to have followed. At a later time we might like to have another option to start a random sequences for the purpose of training, and not qualification though. You will notice that several rounds are together which means that two targets, one at each of the indicated distances will pop-up at and for the same amount of time.

BRM.jpg

Also each table listed is for various shooting positions, and thanks to ACE we can do the prone supported, prone unsupported, and then kneeling. The script would need to allow for a significant pause between tables of about 45 seconds, but the preferred option would be to allow the instructor/controller to have a way to enable the qualification to continue to the next table. The other thing would be to have a pause after each round (aka set of targets as see in the above image). If possible it would nice to have it be about 4 seconds from when the last target went down (if shot), or regardless of it or not, 4 seconds from when the target automatically goes down by itself if it does not get hit. We also need to have a system that would record the entire thing and at the end give out a result showing XX/40 (40 being the maximum).

Anyone how might have the ability to create something like or exactly as I mentioned above is asked to contact me. As noted earlier we will compensate someone for their time as this is a vital asset that we need.

Edited by Alderman

Share this post


Link to post
Share on other sites

shooting_range.utes.zip

Hey! I've a problem with my script, couple of (frequently -2 or -3) targets are usually does not appear, just the target counter counts. Any Ideas? Thank You!

Share this post


Link to post
Share on other sites

You may want to change the following line

Old

_rnumber = random _many-1;

New

_rnumber = floor random _many;

I don't know if it will fix the problem but it's better to use whole numbers for this.

Share this post


Link to post
Share on other sites

_rnumber = floor random _many;

Tested and worked perfectly! Many Thanks!

Share this post


Link to post
Share on other sites

Hey there:

I finally got around to working on a range and used the script F2k Sel worked up. Works great except at least twice in 20 targets I get repeats where the last target stays up for another round. Any way anyone can see to fix that?

Thanks,

-e

Share this post


Link to post
Share on other sites

In response to my previous post on what my unit is looking for. If someone can create the system we talk about above, our organization will make a financial contribution to the individual, group of people, or an organization/business that can create it. Please contact me directly for details.

Share this post


Link to post
Share on other sites

Cant get the pop up to work targets are being missed out ie no target poping up and being counted as misses. Also one question would this work with the nato targets from arma as i have them set up and the targets appear but i cant get it to register hits.

Share this post


Link to post
Share on other sites

heey guys

i have make my own training map, is there a way to get a message in the screen if i pass a training or not. my idea is to have 20 targets pop up. and you need to hit 18 targets for completing. if you hit <17 you get a message fail and if you hit 18> you got training exam passed.

//////////////////////////////////////////////////////////////////

// How to use.

// 1. Place a popup target and name it to pt1

// 2. copy it 8 times and it will auto name the targets

// 3. place this line in a trigger or init nul=[] execVM "popup.sqf"

_inc = 0;

_count = 0;

_targets = [pt1,pt1_1, pt1_2, pt1_3, pt1_4, pt1_5, pt1_6, pt1_7];

_many = count _targets;

nopop=true;

{_x animate["terc",1]} forEach _targets;

hint "Setting up the Range";

sleep 2;

hint "Load magazine of 30 rounds";

sleep 4;

hint "Ready";

sleep 4;

while {_inc<20} do

{

_rnumber = random _many-1;

_rtarget = _targets select _rnumber;

_rtarget animate["terc", 0];

sleep 7;

if (_rtarget animationPhase "terc" > 0.1) then

{

_count = _count+1;

};

hint format ["Targets :%1 Hit :%2",_inc+1,_count];

_rtarget animate["terc", 1];

_inc = _inc + 1;

};

sleep 8;

hint "Session Complete";

sleep 2;

hint "Wait for results";

sleep 4;

Share this post


Link to post
Share on other sites

Anyway to transpose the scores into the debriefing? I love it but would like the final score posted.

Share this post


Link to post
Share on other sites

Instead of making a new thread I find it reasonable to post it here even thought its in wrong section but its regarding the script by F2k.

I decided to make a firing range but as I am lazy and found out that F2K had released a good firing range script with targets & count system I decided to use it(It works perfect yes!) until I put it on a dedicated server where the popup targets screws up, basically - The target pops up I hit it but it re pops up + a new target pops up and when I shoot the other target the old target pops up and the new target pops up and another new one pop ups which is kinda messy so I decided to re-script the animation way(Still does this but it doesn't pop up fully) and now I really need help - How to fix this so the targets stop popping up after being hit..

Script:

_inc     = 0;
_count   = 0;
_targets = [p1_1,p2_1,p3_1,p4_1,p5_1];
_many    =  count _targets;
nopop=true;
{_x  animate["terc",1]} forEach _targets;

hint "Setting up the Range";
sleep 2;
hint "Ready";
sleep 2;


while {_inc<15} do 
{
_rtarget animate["terc", 1];
_rnumber = floor random _many;
_rtarget = _targets select random ((count _targets) - 1);
{_x  animate["terc",1]} forEach _targets;
_rtarget animate["terc", 1];
_rtarget animate["terc", 0];
sleep 5;
if (_rtarget animationPhase "terc" > 0.1) then
{
	_count = _count+1;
	_rtarget animate["terc", 1];
};
hintSilent format ["Targets :%1 Hit :%2",_inc+1,_count];
_rtarget animate["terc", 1];
_inc = _inc + 1;
sleep 2;
};
{_x  animate["terc",0]} forEach _targets;
sleep 3;
hint "Session Complete";

I added eventHandler it neither fixed the issue and just caused more problem so I removed it..

Any issues you guys can see except I am repeating shitout of animation?

Share this post


Link to post
Share on other sites

Hi, I never did make a full working version for several reasons the main being I really don't like pop ups and also I don't know how to get the score to display on one PC.

I haven't tried MP scripting either but have you tried just running it on the server alone.

place at the begining of the script.

if(!isServer)exitWith{};

Share this post


Link to post
Share on other sites

I would think it's because it's running on the server and all other clients. Try the above code to shut down the client scripts.

Share this post


Link to post
Share on other sites

if you run the script via addAction only the person who performs the addAction sees the hints/score and everyone sees the targets.

when i tried

if(!isServer)exitWith{};

nobody sees the hints/scores but they do get the popups

if you run it via server side trigger everyone sees the hints but the popups go haywire because everyone is triggering the popups...

i'm trying to make the script only popup server side but hint/score on all clients

hey F2k Sel, any ideas? I'll post my work in progress modification if it'd help.

EDIT: currently messing with some ideas, will post back later

Edited by drivetheory
info update

Share this post


Link to post
Share on other sites

For a firing range I did once we reset the range via a local trigger on the instructor which set a variable that reset the range via on-map trigger, so everyone reset it at the same time.

instructor's player_init:

if (_unit == user1) then {  
trgSST = createTrigger ["EmptyDetector",[1,0,0]];
trgSST setTriggerActivation ["ALPHA", "", true];
trgSST setTriggerType "NONE";
trgSST setTriggerStatements
	["this",
	"SST_resetpop = true; publicVariable ""SST_resetpop"";",
	""];
trgSST setTriggerText "Reset Iron Sights Ranges";
};

And the trigger on the map had:

Condition of:

SST_resetpop

onAct of:

{_x setDamage 0; _x animate["terc", 0]} forEach laneTargets; SST_resetpop = false; publicVariable "SST_resetpop";

laneTargets is a game logic on the map with this as it's init:

laneTargets = nearestObjects [this, ["TargetBase"], 130];

We didn't try to keep score though, since it was obvious to the instructor how many they'd hit. :)

Share this post


Link to post
Share on other sites

got the popup target range script working in an MP environment, will post back later with complete details

Edited by drivetheory
update

Share this post


Link to post
Share on other sites

Hello devetheory, Did you ever get around to posting how you got MP Firing range to work. I would love to see it if you care to share it with me.

  • Like 1

Share this post


Link to post
Share on other sites

I've only just realised this is for arma 2 i have put in in to arma 3 and it doesn't count the hits, what do i need to change? everything else works fine. just no count.

Share this post


Link to post
Share on other sites

Hello,

Jnewbie here, I have set up a range where triggers active targets to pop up when activated (presence triggers). The question I have is, is there a script that will enable me to reset the a single lane (I have 4 lanes with about 10 triggers on each, and each trigger activates 4 targets). My intent is to have a player go through a single lane, once complete, reset the lane so another player can use the same lane. Can this be done?

Please advise

Share this post


Link to post
Share on other sites

Hi I am pretty new to mission making and editing and was wondering if anybody could help me. I am building a shooting range and I am having my pop up targets linked to a shooting console. I have figured out how to link it to a console but I am hoping to set a function where the pop up target stays up over a timed period and after the time falls down. can anybody help me with this problem or has it never been done before?

Share this post


Link to post
Share on other sites
Hi I am pretty new to mission making and editing and was wondering if anybody could help me. I am building a shooting range and I am having my pop up targets linked to a shooting console. I have figured out how to link it to a console but I am hoping to set a function where the pop up target stays up over a timed period and after the time falls down. can anybody help me with this problem or has it never been done before?

Did you read the thread before you asked?

Edit: Tried it in my training mission at saturday, it works like charm. Thank you F2K!

Edited by Mirek
Just words of appreciation.

Share this post


Link to post
Share on other sites
There are several scripts around but this is one someone else started and I added some scoring which may not be 100% right.

I think it's popping up a target that doesn't exist, see if you can fix it.

//////////////////////////////////////////////////////////////////
//                 How to use. 
// 1. Place a popup target and name it to pt1 
// 2. copy it 8 times and it will auto name the targets
// 3. place this line in a trigger or init  nul=[] execVM "popup.sqf" 

_inc     = 0;
_count   = 0;
_targets = [pt1,pt1_1, pt1_2, pt1_3, pt1_4, pt1_5, pt1_6, pt1_7];
_many    =  count _targets;
nopop=true;
{_x  animate["terc",1]} forEach _targets;

hint "Setting up the Range";
sleep 2;
hint "Ready";
sleep 2;


while {_inc<20} do 
{
_rnumber = random _many-1;
_rtarget = _targets select _rnumber;
_rtarget animate["terc", 0];
sleep 3;
if (_rtarget animationPhase "terc" > 0.1) then
{
	_count = _count+1;
	    };
  hint format ["Targets :%1 Hit :%2",_inc+1,_count];
_rtarget animate["terc", 1];
_inc = _inc + 1;
};
sleep 8;
hint "Session Complete";

I found out why the popup counter is outrunning the popups.

_rnumber = random _many-1; //change the 1 to .25//

if (_rtarget animationPhase "terc" > 0.1) then //and the 0.1 here to 0.001//

I was hitting every target that popped but the counter would always finish before I hit all of them. It seems to be working great now.

I don't know why this worked so if anyone knows exactly what each function does please inform me.

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  

×