Page 1 of 7 12345 ... LastLast
Results 1 to 10 of 69

Thread: Pop-Up Targets (Firing Range)

  1. #1

    Pop-Up Targets (Firing Range)

    I do apologize for making yet another thread related to Pop Up targets, but I am yet to find what I am looking for.

    I am working on a training camp for the realism unit that I am in. It includes multiple things, including a firing range. Right now the range is just a bunch of spread out targets from 50 to 700 meters out that fall when you hit them, then they come back up a couple seconds later. If anyone here has played the America's Army 3 Marksmanship Qualification course, that is what I am looking for. For those of you who haven't, I want to be able to make the red targets not only fall when hit, but also fall if it isn't hit within a certain amount of time, then pop back up after a certain amount of time, then continue the cycle endlessly. If anyone can help me, please reply in this thread or catch me on xfire: rrkiller789 . Thank you!

    -SPC KC Grimes,
    3/1-15/K/1/1/1


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

    Code:
    //////////////////////////////////////////////////////////////////
    //                 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";

  3. #3
    Master Sergeant
    Join Date
    Jul 18 2009
    Location
    Austin, Texas
    Posts
    634
    Author of the Thread
    Thanks for the reply. I do not know much about triggers and modules yet (still working on that), so what is the trigger in that script? How do I start this?

  4. #4
    Past this in one of the popup targets
    Code:
    nul=[] execVM "popup.sqf"
    and name the targets
    Code:
    pt1,pt1_1, pt1_2, pt1_3, pt1_4, pt1_5, pt1_6, pt1_7
    just like that.

  5. #5
    Master Sergeant
    Join Date
    Jul 18 2009
    Location
    Austin, Texas
    Posts
    634
    Author of the Thread
    It works perfectly. Thank you very much! I haven't experienced it popping up any non-existent target's though.

  6. #6
    This is the same script I am using (although I modified mine a bit) but it works well. Thanks mate!

  7. #7
    Master Sergeant
    Join Date
    Jul 18 2009
    Location
    Austin, Texas
    Posts
    634
    Author of the Thread
    So, this script is working great, I just had 4 questions :P

    1. Is there a way to get the targets to start down instead of up at the start of the session? It's just kind of confusing when it says "Begin!" and then 3 targets pop up, but they don't count. So if they could fall down instead of pop up at the start, that would be awesome.

    2. At each hint and each change of the set of targets there is a VERY loud bleeping/pinging sound. Any idea as to how to get rid of that or lower the volume?

    3. When the targets sets are switching, all of the targets flip up and down rapidily a couple times, then are either up or down but still random. Any idea how to fix this? Or is it just lag?

    4. This part is pretty much optional. The map I have is a full training camp with many things on it. Is there a way to set up a trigger that activates this qualification script below? It's fine how it is, but it is just really annoying to have to end the map, switch out the scripts, then start it again with everyone redownloading and reloading. In the Single Player shooting range in BCT it is started on a trigger it seems, or some script. Anyone have any idea as to how to do that?


    Here's my popup.sqf script for Pistol Qualification:
    Code:
    _inc     = 0;
    _count   = 0;
    _targets = [pt5, pt5_1, pt5_2];
    _many    =  count _targets;
    nopop=true;
    {_x  animate["terc",1]} forEach _targets;
    
    sleep 10;
    hint "Please wait until everyone loads the map";
    sleep 20;
    hint "Welcome to Camp Marne's Live Fire Pistol Qualification Range";
    sleep 5;
    hint "Setting up the Range";
    sleep 3;
    hint "The Qualification Course will begin in 10 Seconds";
    sleep 2;
    hint "The Qualification Course will begin in 8 Seconds";
    sleep 2;
    hint "The Qualification Course will begin in 6 Seconds";
    sleep 2;
    hint "The Qualification Course will begin in 4 Seconds";
    sleep 2;
    hint "The Qualification Course will begin in 2 Seconds";
    sleep 2;
    hint "Begin!";
    
    while {_inc<10} do 
    {
    _rnumber = random _many-1;
    _rtarget = _targets select _rnumber;
    _rtarget animate["terc", 0];
    sleep 5;
     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 5;
    hint "Qualification complete! See your CO for score and debriefing.";
    Thanks for putting up with me.

  8. #8
    1. All I can think of is putting this code in the Init Box of each target, then they'll go down as they're created .
    Code:
    this animate["terc",1]
    2. You can make the Hint silent ie HintSilent and then the text or use Sidechat I think.

    3. If your trying to use it for multi player then I believe you need to add a couple of lines of script, I haven't any experience yet so you'll have to search around for that.

    4. If your currently calling the code from an Init Box then just copy that line to a trigger and place it in the on Act box and set the trigger up to anyone present.

  9. #9
    Master Sergeant
    Join Date
    Jul 18 2009
    Location
    Austin, Texas
    Posts
    634
    Author of the Thread
    Ah, now I see what you mean by it not counting properly. I want to have 5 targets for the pistol range. Is there a way I can choose how many targets pop up each set? And is there a way to have the counter count the number of targets hit/miss, not set?

  10. #10
    You could just copy and rename the script and change the target names but that would require two different ranges.

    If you want to keep to one script you could lay down the max number of targets and then pass a variable to replace the
    Code:
    _many    =  count _targets;
    with the number of targets you want to popup.

    If you had 8 max targets changing many to 3 would result in the first 3 targets working, if it was 5 then the first 5 would popup ect.


    I haven't tested it so it may or may not work.

    As for the last part of the question I don't really understand it.

Page 1 of 7 12345 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •