Jump to content

Harvath.S

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by Harvath.S


  1. There was no change to behavior of the targets. Upon the target raising and being hit it still behaves exactly like a popup target would normally.

     

    To clarify the first post, my issue is this:

    First target pops

    First target is hit

    First target lowers

    First target pops ///// this is where the issue is.

    Second target pops

     

    Timing is not a big issue. Our members do a familiarization course on a range with no scripting and simple targets. The KD Range is only used by the member one time. But do I understand you correctly in that there is a certain window of time to hit the target *between* the sleep commands?

     

    My understanding, basic that it is, is that the first sleep command below is the time until the target would lower itself. Meaning that as long as the target is hit during the 4 seconds before it is lowered should be all that matters? I could be and probably am way off base with that; but it is how I understand it to be.

    pt1_50 animate["terc", 0];
    
    sleep 4;
    
    
    if (pt1_50 animationPhase "terc" != 0) then { 
    	_count = _count + 1;
    };
    pt1_50 animate["terc", 1];
    _inc = _inc +1
    
    sleep 3;

     


  2. Hello all,

     

    Thank you in advance for the help.

     

    I have run into an issue with a script I am using for a KD Range. The scripts work exactly how I want them too. But I have run into an issue once I uploaded the mission with these scripts to the Dedicated Server.

     

    The targets are designed to popup on command, which they do, and then go down and stay down once shot or a certain period of time has passed. This is where I find my issue.

     

    If there is no outside influence (The target does not get shot) the script works perfectly. However, if the target is shot it goes down and pops back up until the script calls that target again, at which point the target remains up until the script tells it to lower itself.

     

    I am calling the script using addAction on an object.


    Here is the script:

    Spoiler

    initPlayerLocal.sqf

    
    Range_1 addAction ["Activate Range","popup1.sqf"];

    popup1.sqf

    
    #define SOUND_ACTIVE "a3\missions_f_beta\data\sounds\firing_drills\course_active.wss"
    #define SOUND_CLEAR "a3\missions_f_beta\data\sounds\firing_drills\checkpoint_clear.wss"
    
    if (isDedicated) then{};
    
    _inc     = 0;
    _count   = 0;
    _targets = [pt1_50,pt1_100, pt1_150, pt1_200, pt1_250, pt1_300];
    _group   = 0;
    
    {_x  animate["terc",1]} forEach _targets;
    
    nopop=true;
    
    
    sleep 5;
    [-2, {hint _this}, "Please ensure that one 20 round magazine is loaded."] call CBA_fnc_globalExecute;
    sleep 5;
    [-2, {hint _this}, "Assume a prone, supported position and scan your lane."] call CBA_fnc_globalExecute;
    sleep 5;
    [-2, {hint _this}, "Range Starting in 10 seconds!"] call CBA_fnc_globalExecute;
    sleep 5;
    [-2, {hint _this}, "Range Starting in 5 seconds!"] call CBA_fnc_globalExecute;
    sleep 5;
    [-2, {hint _this}, "Range is hot!"] call CBA_fnc_globalExecute;
    playSound3D [SOUND_ACTIVE, range_1, false, getPosASL range_1, +5, 1, 10];
    
    
    pt1_50 animate["terc", 0];
    
    sleep 4;
    
    
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    
    pt1_100 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_150 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_250 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_250 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_250 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_200 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_200 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_200 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_300 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_300 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_300 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_150 animate["terc", 0];
    pt1_200 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    if (pt1_200 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_200 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 3;
    
    
    
    pt1_100 animate["terc", 0];
    pt1_250 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    if (pt1_250 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_250 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 3;
    
    
    
    pt1_300 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_300 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_300 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_50 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_200 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_200 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_200 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_150 animate["terc", 0];
    
    
    sleep 4;
    
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_100 animate["terc", 0];
    pt1_200 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    if (pt1_200 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_200 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 3;
    
    
    
    pt1_150 animate["terc", 0];
    pt1_100 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 3;
    
    
    
    pt1_100 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_50 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    playSound3D [SOUND_CLEAR, range_1, false, getPosASL range_1, +5, 1, 10];
    
    sleep 3;
    [-2, {hint _this}, "Reload one 10 round magazine."] call CBA_fnc_globalExecute;
    sleep 10;
    [-2, {hint _this}, "Assume a prone, unsupported position."] call CBA_fnc_globalExecute;
    sleep 10;
    [-2, {hint _this}, "Scan your Lane, Range is hot!"] call CBA_fnc_globalExecute;
    playSound3D [SOUND_ACTIVE, range_1, false, getPosASL range_1, +5, 1, 10];
    
    pt1_50 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    pt1_150 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_100 animate["terc", 0];
    pt1_200 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    if (pt1_200 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_200 animate["terc", 1];
    };
    _inc = _inc +2;
    
    
    sleep 3;
    
    
    
    pt1_300 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_300 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_300 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_150 animate["terc", 0];
    pt1_50 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 3;
    
    
    
    pt1_100 animate["terc", 0];
    pt1_250 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    if (pt1_250 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_250 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 3;
    
    
    
    pt1_50 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    playSound3D [SOUND_CLEAR, range_1, false, getPosASL range_1, +5, 1, 10];
    
    sleep 3;
    [-2, {hint _this}, "Reload one 10 round magazine."] call CBA_fnc_globalExecute;
    sleep 6;
    [-2, {hint _this}, "Assume a kneeling position."] call CBA_fnc_globalExecute;
    sleep 10;
    [-2, {hint _this}, "Scan your Lane, Range is hot!"] call CBA_fnc_globalExecute;
    playSound3D [SOUND_ACTIVE, range_1, false, getPosASL range_1, +5, 1, 10];
    
    pt1_50 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    pt1_100 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_50 animate["terc", 0];
    pt1_150 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 3;
    
    
    
    pt1_150 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    _inc = _inc +1;
    
    
    sleep 3;
    
    
    pt1_50 animate["terc", 0];
    pt1_100 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_50 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_50 animate["terc", 1];
    };
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 4;
    
    
    
    pt1_100 animate["terc", 0];
    
    sleep 4;
    
    if (pt1_100 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_100 animate["terc", 1];
    };
    _inc = _inc +1;
    
    sleep 3;
    
    
    
    pt1_150 animate["terc", 0];
    pt1_200 animate["terc", 0];
    
    sleep 6;
    
    if (pt1_150 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_150 animate["terc", 1];
    };
    if (pt1_200 animationPhase "terc" != 0) then {
            _count = _count + 1;
    } else {
            pt1_200 animate["terc", 1];
    };
    _inc = _inc +2;
    
    sleep 3;
    
    playSound3D [SOUND_CLEAR, range_1, false, getPosASL range_1, +5, 1, 10];
    [-2, {hint _this}, "Cease Fire! Cease Fire! Cease Fire!"] call CBA_fnc_globalExecute;
    {_x  animate["terc",1]} forEach _targets;
    
    sleep 5;
     if (_count >= 36)  then {hint "You Scored EXPERT"};
    
     if (_count <= 35)  then {hint "You Scored RIFLEMAN"};
    
     if (_count <= 29)  then {hint "You Scored Marksman"};
    
     if (_count <= 22)  then {hint "FAILED"};

     

     

    Again, thank you for the help.

×