Results 1 to 7 of 7

Thread: Rearming an AV8-GBU

  1. #1
    Having problems here guys.

    For -{GOL}-'s training map, we need to be able to rearm an AV8 when it lands. However close I get the rearm truck to the plane, it just won't let me rearm when I get back in the plane.

    Any ideas fellas? Cheers

  2. #2
    AFAIK its a bug. You have to leave one Bomb. Otherwise it won't rearm.

  3. #3
    Master Gunnery Sergeant
    Join Date
    Dec 18 2005
    Location
    Adelaide, Australia
    Posts
    1,306
    Sounds like the old OFP rearm script bug. The wiki suggests it has been fixed for land vehicles but not air units.

    You can make a new rearming script, use removeMagazine then addMagazine.



    [self-promotion]
    OFP:R Island : Rezina
    [/self-promotion]

  4. #4
    Sergeant
    Join Date
    Jan 9 2007
    Location
    Bath, United Kingdom
    Posts
    154
    Author of the Thread
    Christ. Could anyone whip me up a quick rearming script at all? Ha, cheers for any help!

  5. #5
    I have a rearming script that works for chopper, haven't tried it on planes, but you are welcome to try it:

    put a trigger in the rearm area, and call this script with it:
    Landing.sqs
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Script controlling the landing
    _koef = 4;

    #Again
    PlayerOut = true

    @ &#40;{vehicle player == _x} count list AirportIn &#62; 0&#41; and vehicle player &#33;= player and speed &#40;vehicle player&#41; &#62; -2 and speed &#40;vehicle player&#41; &#60; 2
    _timeNow = _time;

    @ &#33;&#40;&#40;{vehicle player == _x} count list AirportIn &#62; 0&#41; and vehicle player &#33;= player and speed &#40;vehicle player&#41; &#62; -2 and speed &#40;vehicle player&#41; &#60; 2&#41; or &#40;_time-_timeNow &#62;= _koef&#41;
    ? &#33;&#40;&#40;{vehicle player == _x} count list AirportIn &#62; 0&#41; and vehicle player &#33;= player and speed &#40;vehicle player&#41; &#62; -2 and speed &#40;vehicle player&#41; &#60; 2&#41; &#58; goto &#34;Again&#34;

    ; Now he is at the airport&#33;

    ? side player == east &#58; EastWho = player;
    ? side player == west &#58; WestWho = player;

    PlayerOut = false;
    player exec &#34;Repairs.sqs&#34;;

    ? side player == east &#58; goto &#34;EastSide&#34;
    WestScored = true;
    publicVariable &#34;WestWho&#34;;
    publicVariable &#34;WestScored&#34;;
    goto &#34;SideEnd&#34;;

    #EastSide
    EastScored = true;
    publicVariable &#34;EastWho&#34;;
    publicVariable &#34;EastScored&#34;;

    #SideEnd
    @ not alive player or &#40;&#40;getPos player select 2&#41;&#62;20 and &#40;&#40;{vehicle player == _x} count list AirportIn == 0&#41;&#41;&#41;
    goto &#34;Again&#34;;[/QUOTE]
    Then put this script in your mission folder as landing.sqs calls it:
    repairs.sqs
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Repairing and rearming

    _who = _this;

    ? not local &#40;_who&#41; &#58; exit

    ; Rearming
    @ &#40;vehicle _who &#33;= _who&#41; or not alive _who
    ? not alive _who &#58; exit

    _veh = vehicle _who;
    ;;to be edited soon for rearm


    ; Repairing
    _koef = 0.5;

    _who sidechat &#34;Crewchief, requesting service&#34;

    CrewChief sidechat &#34;Roger, service on the way&#34;
    ~5
    CrewChief sidechat &#34;Commencing service&#34;



    #LoopRepair
    ? PlayerOut &#58; goto &#34;getback&#34;;

    _timeDif = _time;

    @ &#33;&#40;&#40;{vehicle player == _x} count list AirportIn &#62; 0&#41; and vehicle player &#33;= player and speed &#40;vehicle player&#41; &#62; -2 and speed &#40;vehicle player&#41; &#60; 2&#41; or &#40;_time-_timeDif &#62;= _koef&#41;
    ? &#33;&#40;&#40;{vehicle player == _x} count list AirportIn &#62; 0&#41; and vehicle player &#33;= player and speed &#40;vehicle player&#41; &#62; -2 and speed &#40;vehicle player&#41; &#60; 2&#41; &#58; goto &#34;LoopRepair&#34;

    ? getDammage _veh &#62; 0 &#58; _veh setDammage &#40;&#40;getDammage _veh&#41;-0.0125&#41;;
    ? getDammage _veh &#60;= 0 &#58; CrewChief sidechat &#34;Repairs complete, commencing refueling&#34;&#59; goto &#34;gasup&#34;;
    goto &#34;LoopRepair&#34;;

    #gasup
    ? PlayerOut &#58; goto &#34;getback&#34;
    ? fuel _veh &#60; 1 &#58; _veh setfuel &#40;&#40;fuel _veh&#41; + 0.0125&#41;;
    ? fuel _veh &#62;= 1 &#58; CrewChief sidechat &#34;Commencing rearm&#34;&#59; _level = 0&#59; _veh setvehicleammo .1; goto &#34;rearm&#34;
    ~1
    goto &#34;gasup&#34;

    #rearm
    ? PlayerOut &#58; goto &#34;getback&#34;;
    _level = _level + .1
    _veh setvehicleammo _level
    ~2
    ?_level &#60; 1 &#58; goto &#34;rearm&#34;
    goto &#34;end&#34;

    #getback
    CrewChief sidechat &#34;Wait&#33; Service incomplete&#34;
    goto &#34;endi&#34;

    #endi
    CrewChief sidechat &#34;OK then, we didn&#39;t finish but there you go anyway&#34;
    exit

    #end
    CrewChief sidechat &#34;Service complete, be careful out there&#33;&#34;
    exit





    [/QUOTE]
    Visit {USI} at {USI} home

  6. #6
    @Zombie

    I tried your script, with the trigger. I can not get it to work.

    I must be setting up the trigger wrong.

    Please list how to setup the trigger correctly.

    If you have a demo mission showing how to do this, I would like to grab it, if that is possible.
    <a href=\"http://www.gametracker.com/server_info/75.126.130.133:2302/\" target=\"_blank\">

    </a>

  7. #7
    @Zombie

    I got this to work. My fault, I assumed that once you land, and had no damage it would rearm. Once I figured out, that I could only rearm / refuel if I had damaged, it worked fine.

    Any plans to modify this so that if you have no damage, it will still rearm / refuel? That would be great if you could get that to happen.

Posting Permissions

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