Jump to content

Recoilless

Member
  • Content Count

    14
  • Joined

  • Last visited

  • Medals

Posts posted by Recoilless


  1. I tried this but to no avail, perhaps its something wrong with the scripting itself, and yes I know the names make no sense; it's altered copypasta.

    if(isServer) then {
    GroupAlpha1 = CreateGroup West;
    Helo1 = createVehicle ["A10", [(getMarkerPos "Startingpoint1") select 0,(getMarkerPos "Startingpoint1") select 1,100], [], 0, "FLY"];
    HeliPilot1 = GroupAlpha1 createUnit ["USMC_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"];
    HeliPilot1 moveInDriver Helo1;
    wp12 = GroupAlpha1 addwaypoint [position Targetarea, 0];
    wp12 setwaypointtype "SAD";
    }


  2. Can any one help me? I'm trying to get the battery to sleep a "random" amount of time(really radius/10 or /100). I have this but I cant figure out why it doesn't work.

    ; ****************************************************************
    ; Script file for Armed Assault
    ; Updated for Arma 2 Zu-23 by Recoilless
    ; Created by: SUPR3ME KILL3R
    ; Thanks to Arma Edit
    ; ****************************************************************
    
    
    _K = _this select 0
    _Target = _this select 1
    _radius = _this select 2
    _altitude = _this select 3
    
    sleep ;(_radius/10);
    #Flakloop
    
    _a= getpos _Target select 0
    _b= getpos _Target select 1
    _c= getpos _Target select 2
    
    _gap=random _radius
    _direction=random 360
    
    _x = _a +((cos _direction)*_gap)
    _y = _b +((sin _direction)*_gap)
    _z = _c + _altitude - _radius + random (_radius*2)
    
    _gap2=random _radius
    _direction2=random 360
    
    _xx = _a +((cos _direction2)*_gap2)
    _yy = _b +((sin _direction2)*_gap2)
    _zz =_c + _altitude - _radius + random (_radius*2)
    
    _gap3=random _radius
    _direction3=random 360
    
    _xxx = _a +((cos _direction3)*_gap3)
    _yyy = _b +((sin _direction3)*_gap3)
    _zzz = _c + _altitude - _radius + random (_radius*2)
    
    _gap4=random _radius
    _direction4=random 360
    
    _xxxx = _a +((cos _direction4)*_gap4)
    _yyyy = _b +((sin _direction4)*_gap4)
    _zzzz = _c + _altitude - _radius + random (_radius*2)
    
    _K disableAI "Target"
    _K disableAI "AutoTarget"
    _K doWatch [_x,_y,_z]
    ~0.5
    _K setVehicleAmmo 1
    _K fire "2A14"
    _K doWatch [_xx,_yy,_zz]
    ~0.5
    _K fire "2A14"
    _K doWatch [_xxx,_yyy,_zzz]
    ~0.5
    _K fire "2A14"
    _K doWatch [_xxxx,_yyyy,_zzzz]
    ~2
    goto "Flakloop"
    
    exit

    Also if any one knows how to make them fire for a sustained time that would be great.

    ---------- Post added at 08:41 PM ---------- Previous post was at 08:40 PM ----------

    Thanks!

    It shoots for me, but not up in the air.

    The friendly units around my AA are not safe :eek:

    What values are you calling for the script? I had the same prob, but your probably not aiming high enough.


  3. I took a look at it and it seems as if it would give a good effect but it doesn't want to fire.

    I can see it turning about targeting but there is no shooting, do I need any modules to get it to work?

    I had to change it a bit to get it to work. The script tries to fire a gun. You need to change it so that it fires the appropriate gun.

    ; ****************************************************************
    ; Script file for Armed Assault
    ; Updated for Arma 2 Zu-23 by Recoilless
    ; Created by: SUPR3ME KILL3R
    ; Thanks to Arma Edit
    ; ****************************************************************
    
    
    _K = _this select 0
    _Target = _this select 1
    _radius = _this select 2
    _altitude = _this select 3
    
    #Flakloop
    
    _a= getpos _Target select 0
    _b= getpos _Target select 1
    _c= getpos _Target select 2
    
    _gap=random _radius
    _direction=random 360
    
    _x = _a +((cos _direction)*_gap)
    _y = _b +((sin _direction)*_gap)
    _z = _c + _altitude - _radius + random (_radius*2)
    
    _gap2=random _radius
    _direction2=random 360
    
    _xx = _a +((cos _direction2)*_gap2)
    _yy = _b +((sin _direction2)*_gap2)
    _zz =_c + _altitude - _radius + random (_radius*2)
    
    _gap3=random _radius
    _direction3=random 360
    
    _xxx = _a +((cos _direction3)*_gap3)
    _yyy = _b +((sin _direction3)*_gap3)
    _zzz = _c + _altitude - _radius + random (_radius*2)
    
    _gap4=random _radius
    _direction4=random 360
    
    _xxxx = _a +((cos _direction4)*_gap4)
    _yyyy = _b +((sin _direction4)*_gap4)
    _zzzz = _c + _altitude - _radius + random (_radius*2)
    
    _K disableAI "Target"
    _K disableAI "AutoTarget"
    _K doWatch [_x,_y,_z]
    ~0.5
    _K setVehicleAmmo 1
    _K fire "2A14"
    _K doWatch [_xx,_yy,_zz]
    ~0.5
    _K fire "2A14"
    _K doWatch [_xxx,_yyy,_zzz]
    ~0.5
    _K fire "2A14"
    _K doWatch [_xxxx,_yyyy,_zzzz]
    ~2
    goto "Flakloop"
    
    exit

    This version should work for any zu-23


  4. Ok bare with me here :D

    This is supremekillers flak script I used in ARMA and with some tweaking should work in A2

    ; ****************************************************************
    ; Script file for Armed Assault
    ; Created by: SUPR3ME KILL3R
    ; Thanks to Arma Edit
    ; ****************************************************************
    
    
    _K = _this select 0
    _Target = _this select 1
    _radius = _this select 2
    _altitude = _this select 3
    
    #Flakloop
    
    _a= getpos _Target select 0
    _b= getpos _Target select 1
    _c= getpos _Target select 2
    
    _gap=random _radius
    _direction=random 360
    
    _x = _a +((cos _direction)*_gap)
    _y = _b +((sin _direction)*_gap)
    _z = _c + _altitude - _radius + random (_radius*2)
    
    _gap2=random _radius
    _direction2=random 360
    
    _xx = _a +((cos _direction2)*_gap2)
    _yy = _b +((sin _direction2)*_gap2)
    _zz =_c + _altitude - _radius + random (_radius*2)
    
    _gap3=random _radius
    _direction3=random 360
    
    _xxx = _a +((cos _direction3)*_gap3)
    _yyy = _b +((sin _direction3)*_gap3)
    _zzz = _c + _altitude - _radius + random (_radius*2)
    
    _gap4=random _radius
    _direction4=random 360
    
    _xxxx = _a +((cos _direction4)*_gap4)
    _yyyy = _b +((sin _direction4)*_gap4)
    _zzzz = _c + _altitude - _radius + random (_radius*2)
    
    _K disableAI "Target"
    _K disableAI "AutoTarget"
    _K doWatch [_x,_y,_z]
    ~0.5
    _K setVehicleAmmo 1
    _K fire "azp85"
    _K doWatch [_xx,_yy,_zz]
    ~0.5
    _K fire "azp85"
    _K doWatch [_xxx,_yyy,_zzz]
    ~0.5
    _K fire "azp85"
    _K doWatch [_xxxx,_yyyy,_zzzz]
    ~2
    goto "Flakloop"
    
    exit

    it worked very well and gave a great effect as the round went up.

    all credits to supreme killer as this is his script :)

    INSTALLATION:

    Simply put the demo mission in your Missions folder (my documents/arma/missions) and load it.

    To use the script in another mission, just copy the "flak.sqs" to the same folder of that mission.

    USAGE:

    This script is my first, so its going to need some fine tuning to work for different units in different situations.

    It is however, simple to use. First, place the unit you want to act as a flak battery, and name it (aagun1 for example).

    Then, place an object (trigger is best because you can visually change its size to see the radius they will fire within, and no other AI units will target it) and name it also. Trigger1 for example.

    Now by trigger, script, or any other event, you can execute the script like this:

    [aagun1, trigger1, 250, 1000] exec "flak.sqs"

    250 is the radius the gun will fire randomly inside, in this case 250 meters.

    1000 is the Altitude the weapon will fire at, 1000 meters in this case.

    Place the trigger in the direction you want the gun to fire, so say, place it 250 meters away with 100 meter radius set in the "exec" line. The gun will fire at the trigger, 100 meters around it, in X,y, and Z directions. Placing the trigger directly on top of the AA gun with a radius of say, 300 meters, will make the gun fire in all directions, at angles within the 300 meter radius.

    Once you do it a few times, you can copy/paste and create flak batteries very quickly, in a few minutes at the most.

    Christ whomever programmed this needs a baseball bat to the head for naming their variables


  5. I'm trying to make a guerrilla in a ZU-23 fire into the sky when a trigger is activated.

    So far I have.

    AA1 doWatch [11,11,10000]; AA1 selectWeapon "ZU23_Gue"; AA1 fire "ZU23_Gue";

    Where AA1 is the name of the guerrilla in the gun.

    The doWatch command works and he looks at the position given but I cant get him to fire.

    A little help would be appreciated.

    ~Thanks

×