Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: NEED HELP! How to make a plane drop a FAB-250 and more

  1. #1

    NEED HELP! How to make a plane drop a FAB-250 and more

    I need help please.

    I need to know how to make, say an insurgent SU-25 drop a FAB-250 bomb in a specific area, like when it reaches a waypoint it lets go of a bomb or 2?.

    Also how would I make Carbomb, like a truck explode like a Fab-250 bomb, when it reaches a certain waypoint?

    Help would be greatly appreciated.

  2. #2
    Well I've got an Airstrike script from MrMurrays Editing Guide. Should also work for Arma 2. You only have to change the plane and the pilot i think.

    Code:
    setfire=true;
    titleText ["Click on the map to set your firedirection","plain down"];
    onMapSingleClick "ASTarget setPos _pos; setfire=false";
    @!setfire;
    "Firedirection" setmarkerpos getPos ASTarget;
    onMapSingleClick "";
    titleText ["", "plain down"];
    ;=========DEFINE=======================
    _dropPosition = getpos ASTarget;
    ~0.5
    _dropPosX = _dropPosition select 0;
    _dropPosY = _dropPosition select 1;
    _dropPosZ = _dropPosition select 2;
    ~0.1
    _planespawnpos = [_dropPosX + 3000, _dropPosY, _dropPosZ + 1000];
    _pilotspawnpos = [_dropPosX + 3000, _dropPosY, _dropPosZ + 1000];
    ;=========CREATE=======================
    _PlaneG = creategroup WEST;
    _plane = createVehicle ["AV8B",_planespawnpos,[], 0, "FLY"];
    _plane setPos [(getPos _plane select 0),(getPos _plane select 1),900] ;
    _pilot = "SoldierWPilot" createUnit [getMarkerPos "Firedirection", _PlaneG, "P1=this"];
    _Plane setVelocity [100,0,0] ;
    ~0.4
    P1 moveinDriver _plane;
    P1 setDamage 0;
    P1 action ["gear_up", vehicle P1] ;
    _plane flyinHeight 100;
    _plane setSpeedMode "full";
    #CHECK
    P1 doMove getPos ASTarget;
    P1 doTarget ASTarget;
    P1 doWatch ASTarget;
    ? (_plane distance ASTarget) < 1500 : goto "DROP"
    goto "CHECK"
    ;=========FIRE=======================
    #DROP
    _i = 0
    _plane flyInHeight 100;
    _plane setPos [(getPos _plane select 0),(getPos _plane select 1),100] ;
    ~13
    #FIRE
    _i=_i+1
    _plane fire "BombLauncher";
    ~0.2
    ? _i <= 6 : goto "FIRE"
    ;=========FLY AWAY=======================
    ASTarget setPos [0,0,0];
    "Firedirection" setMarkerPos [0,0];
    _plane setSpeedMode “Full”
    ~4
    _plane flyInHeight 300;
    P1 doMove getPos ASTarget;
    #Check2
    _plane setDamage 0;
    P1 setDamage 0;
    ? (_plane distance Player) > 2500 : goto "ENDE";
    goto "Check2"
    ;=========DELETE========================
    #ENDE;
    deleteVehicle _plane;
    deleteGroup _PlaneG
    deleteVehicle P1;
    exitWith
    Note: You have to put an empty Heli-H on the map called "ASTarget", and you have to place a marker called "Firedirection". If you want the Airstrike to hit a fixed position, just delete the setfire-part and put the "ASTarget" on the position that you want to hit. Hope it works...

  3. #3
    I'm not really sure what I get out of this, do I just put this script in my mission and then open up the map and place where I want the airstrike or?

    It's because I want it as a part of a scenario where I assault this village and I automatically get air support.

  4. #4
    Quote Originally Posted by CruiseMissile View Post
    I'm not really sure what I get out of this, do I just put this script in my mission and then open up the map and place where I want the airstrike or?
    Yes, you can choose the target of the airstrike in-game on your map.

    If you want to get automatically air support on a target that you don't have to choose on the map, put an empty Heli-H in the editor on the map where you want that airstrike and give it a name(let's say "x"). Then you place a trigger with the following syntax on activation:
    Code:
    [x] exec "airstrike.sqs"
    . And then you make a script called "aristrike.sqs" with this code:
    Code:
    ;=========DEFINE=======================
    _Ziel=_this select 0;
    
    _dropPosition = getpos _Ziel;
    ~0.5
    _dropPosX = _dropPosition select 0;
    _dropPosY = _dropPosition select 1;
    _dropPosZ = _dropPosition select 2;
    ~0.1
    _planespawnpos = [_dropPosX + 3000, _dropPosY, _dropPosZ + 1000];
    _pilotspawnpos = [_dropPosX + 3000, _dropPosY, _dropPosZ + 1000];
    ;=========CREATE=======================
    _PlaneG = creategroup WEST;
    _plane = createVehicle ["AV8B",_planespawnpos,[], 0, "FLY"];
    _plane setPos [(getPos _plane select 0),(getPos _plane select 1),900] ;
    _pilot = "Pilot" createUnit [getMarkerPos "Firedirection", _PlaneG, "P1=this"];
    _Plane setVelocity [100,0,0] ;
    ~0.4
    P1 moveinDriver _plane;
    P1 setDamage 0;
    P1 action ["gear_up", vehicle P1] ;
    _plane flyinHeight 100;
    #CHECK
    P1 doMove getPos _Ziel;
    P1 doTarget _Ziel;
    P1 doWatch _Ziel;
    ? (_plane distance _Ziel) < 1500 : goto "DROP"
    goto "CHECK"
    ;=========FIRE=======================
    #DROP
    _i = 0
    _plane flyInHeight 100;
    _plane setPos [(getPos _plane select 0),(getPos _plane select 1),100] ;
    ~13
    #FIRE
    _i=_i+1
    _plane fire "BombLauncher";
    ~0.2
    ? _i <= 6 : goto "FIRE"
    ;=========FLY AWAY=======================
    _Ziel setPos [0,0,0];
    "Firedirection" setMarkerPos [0,0];
    ~4
    _plane flyInHeight 300;
    P1 doMove getPos _Ziel;
    #Check2
    _plane setDamage 0;
    P1 setDamage 0;
    ? (_plane distance Player) > 2500 : goto "ENDE";
    goto "Check2"
    ;=========DELETE========================
    #ENDE;
    deleteVehicle _plane;
    deleteGroup _PlaneG
    deleteVehicle P1;
    exit
    Now, if the trigger is activated, an airstrike should hit at x's position.

  5. #5
    Quote Originally Posted by IndeedPete View Post
    Yes, you can choose the target of the airstrike in-game on your map.

    If you want to get automatically air support on a target that you don't have to choose on the map, put an empty Heli-H in the editor on the map where you want that airstrike and give it a name(let's say "x"). Then you place a trigger with the following syntax on activation:
    Code:
    [x] exec "airstrike.sqs"
    . And then you make a script called "aristrike.sqs" with this code:
    Code:
    ;=========DEFINE=======================
    _Ziel=_this select 0;
    
    _dropPosition = getpos _Ziel;
    ~0.5
    _dropPosX = _dropPosition select 0;
    _dropPosY = _dropPosition select 1;
    _dropPosZ = _dropPosition select 2;
    ~0.1
    _planespawnpos = [_dropPosX + 3000, _dropPosY, _dropPosZ + 1000];
    _pilotspawnpos = [_dropPosX + 3000, _dropPosY, _dropPosZ + 1000];
    ;=========CREATE=======================
    _PlaneG = creategroup WEST;
    _plane = createVehicle ["AV8B",_planespawnpos,[], 0, "FLY"];
    _plane setPos [(getPos _plane select 0),(getPos _plane select 1),900] ;
    _pilot = "Pilot" createUnit [getMarkerPos "Firedirection", _PlaneG, "P1=this"];
    _Plane setVelocity [100,0,0] ;
    ~0.4
    P1 moveinDriver _plane;
    P1 setDamage 0;
    P1 action ["gear_up", vehicle P1] ;
    _plane flyinHeight 100;
    #CHECK
    P1 doMove getPos _Ziel;
    P1 doTarget _Ziel;
    P1 doWatch _Ziel;
    ? (_plane distance _Ziel) < 1500 : goto "DROP"
    goto "CHECK"
    ;=========FIRE=======================
    #DROP
    _i = 0
    _plane flyInHeight 100;
    _plane setPos [(getPos _plane select 0),(getPos _plane select 1),100] ;
    ~13
    #FIRE
    _i=_i+1
    _plane fire "BombLauncher";
    ~0.2
    ? _i <= 6 : goto "FIRE"
    ;=========FLY AWAY=======================
    _Ziel setPos [0,0,0];
    "Firedirection" setMarkerPos [0,0];
    ~4
    _plane flyInHeight 300;
    P1 doMove getPos _Ziel;
    #Check2
    _plane setDamage 0;
    P1 setDamage 0;
    ? (_plane distance Player) > 2500 : goto "ENDE";
    goto "Check2"
    ;=========DELETE========================
    #ENDE;
    deleteVehicle _plane;
    deleteGroup _PlaneG
    deleteVehicle P1;
    exit
    Now, if the trigger is activated, an airstrike should hit at x's position.
    Nice work. I'd like to change the plane from Harrier to SU25 or SU 34. It works nearly. But the SU doesnt drop any bombs. It only flys over the target

    Could you help ?

    THX illu

  6. #6
    Sorry, i didn't write this script - it's from MrMurrays Editing Guide. I just changed a few things for my missions.

    Well, i think your problem is, that the SU-25/34 has no bombs. Only the AV8B has some... But it makes no difference who dropped the Bombs - so you can use the Harrier as well. I think, it's flying so fast, you can't regocnize if it's a BLUFOR or an OPFOR plane.
    Last edited by IndeedPete; Jun 22 2009 at 00:24.

  7. #7
    Quote Originally Posted by IndeedPete View Post
    Sorry, i didn't write this script - it's from MrMurrays Editing Guide. I just changed a few things for my missions.

    Well, i think your problem is, that the SU-25/34 has no bombs. Only the AV8B has some... But it makes no difference who dropped the Bombs - so you can use the Harrier as well. I think, it's flying so fast, you can't regocnize if it's a BLUFOR or an OPFOR plane.
    Yeah, you are right, SU doesnt have LGB bombs. But the Mi24.P chooper has two FAB-250 bomb. The problem here: The script genrates just a pilot, and the Mi has a pilot and a gunner. so yo also need a gunner to drop these FAB-250 bombs...

  8. #8
    The insurgent SU-25 does have FAB-250 bombs...

  9. #9
    I've got not much time now but I think this should work. Add the follwing code to the "Create" area:
    Code:
    _pilot2 = "Pilot" createUnit [getMarkerPos "Firedirection", _PlaneG, "P2=this"];
    P2 moveinGunner _plane;
    P2 setDamage 0;
    P2 action ["gear_up", vehicle P2] ;
    Then you have to change this in the "Check"-loop:
    Code:
    P2 doTarget _Ziel;
    P2 doWatch _Ziel;
    And then at "Fly Away" add:
    Code:
    P2 setDamage 0;
    Now add
    Code:
    deleteVehicle P2
    at "Delete". Well, i hope i forgot nothing...

  10. #10
    Hi IndeedPete, sorry but your stuff with the gunner doesnt work.

    Ok, i modified the script like this, to get this script running with a SU25..

    Code:
    ;=========DEFINE=======================
    _Ziel=_this select 0;
    
    _dropPosition = getpos _Ziel;
    ~0.5
    _dropPosX = _dropPosition select 0;
    _dropPosY = _dropPosition select 1;
    _dropPosZ = _dropPosition select 2;
    ~0.1
    _planespawnpos = [_dropPosX + 3000, _dropPosY, _dropPosZ + 1000];
    _pilotspawnpos = [_dropPosX + 3000, _dropPosY, _dropPosZ + 1000];
    ;=========CREATE=======================
    _PlaneG = creategroup EAST;
    _plane = createVehicle ["Su25_Ins",_planespawnpos,[], 0, "FLY"];
    _plane setPos [(getPos _plane select 0),(getPos _plane select 1),900] ;
    _pilot = "Pilot" createUnit [getMarkerPos "Firedirection2", _PlaneG, "P2=this"];
    _Plane setVelocity [100,0,0] ;
    ~0.4
    P2 moveinDriver _plane;
    P2 setDamage 0;
    P2 action ["gear_up", vehicle P2] ;
    _plane flyinHeight 100;
    #CHECK
    P2 doMove getPos _Ziel;
    P2 doTarget _Ziel;
    P2 doWatch _Ziel;
    ? (_plane distance _Ziel) < 1500 : goto "DROP"
    goto "CHECK"
    ;=========FIRE=======================
    #DROP
    _i = 0
    _plane flyInHeight 100;
    _plane setPos [(getPos _plane select 0),(getPos _plane select 1),100] ;
    ~13
    #FIRE
    _i=_i+1
    _plane fire "AirBombLauncher";
    ~0.2
    ? _i <= 6 : goto "FIRE"
    ;=========FLY AWAY=======================
    _Ziel setPos [0,0,0];
    "Firedirection2" setMarkerPos [0,0];
    ~4
    _plane flyInHeight 300;
    P2 doMove getPos _Ziel;
    #Check2
    _plane setDamage 0;
    P2 setDamage 0;
    ? (_plane distance Player) > 2500 : goto "ENDE";
    goto "Check2"
    ;=========DELETE========================
    #ENDE;
    deleteVehicle _plane;
    deleteGroup _PlaneG
    deleteVehicle P2;
    exit
    The Su25_Ins has 4 FAB bombs (see here). I also changed the _plane fire classname, based on http://community.bistudio.com/wiki/W...er%27s_Sandbox, which is AirBombLauncher for the SU. But the SU dont drop any bombs

    Do you have an idea ?

Page 1 of 3 123 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
  •