Log in to reply

helicopter doesn't use weapon

  • Hello,
    I try to edit dispatch (replace Polmav by buzzard / savage). I have no issue but cops doesn't use weapon (rocket etc.).
    I tried to create scripthookvnet -> spawn lazer, buzzard / savage. Lazer plane use the weapon, however buzzard / savage doesn't use the weapons.
    An idea ?


  • @kartakone
    Not sure at all, but here's a few ideas:

    You might try messing about with the targeting restraints in 'weapons.meta' for the Buzzard's weapon/s. Try copying values from the Lazer or change the Buzzard to use Lazer weapons temporarily & see if that does anything?

    <AimingInfo ref="PLANE_TARGETING_RESTRAINTS" /> etc

    You could try increasing the 'HELI_TARGETING_RESTRAINTS', 'HeadingLimit', 'SweepPitchMin' & 'SweepPitchMax' values to make sure the helicopter can actually pitch enough to be able to target you if you are on the ground/doesn't have to be pointed exactly at you to be able to fire etc:

        <Item type="CAimingInfo">
          <HeadingLimit value="30.000000" />
          <SweepPitchMin value="-15.000000" />
          <SweepPitchMax value="15.000000" />

    I'm sure a ped controlled Hunter can fire rockets at the player (certainly the barrage like multiple rocket attack anyway, it may have been modded to do so, but I had it working in my game years ago), perhaps test to confirm that & then have a look at it's setup/weapons etc for clues :thumbsup:

    I know in previous tests I was unsuccessful at getting the AI Buzzard to use it's mini-guns against the player.
    To me it would seem possible though, even if you have to trick the game into thinking it is firing rockets etc instead. I wasn't exactly commited to it, just messing about seeing what could be done. May well still be possible somehow. :thumbsup:

    Might be worth looking into who is piloting the Helicopter, maybe only army pilots etc can strafe etc. Look at differences in ped files/flags & such, see if anything pops out.

    In 'combattasks.ymt':


    there is this to play about with:

        <Item type="CTaskHelicopterStrafe__Tunables">
          <FlightHeightAboveTarget value="20"/>
          <MinHeightAboveTerrain value="20"/>
          <TargetDirectionMinDot value="0.75000000"/>
          <TargetOffset value="60.00000000"/>
          <TargetMinSpeedToIgnore value="5.00000000"/>
          <TargetMaxSpeedToStrafe value="10.00000000"/>
          <TimeToAvoidTargetAfterDamaged value="10.00000000"/>
          <AvoidOffsetXY value="35.00000000"/>
          <AvoidOffsetZ value="20.00000000"/>
          <MinDotToBeConsideredInFront value="0.70700000"/>
          <BehindRotateAngleLookAhead value="0.00000000"/>
          <SearchRotateAngleLookAhead value="30.00000000"/>
          <CircleRotateAngleLookAhead value="0.00000000"/>
          <BehindTargetAngle value="90.00000000"/>
          <TargetOffsetFilter value="5.00000000"/>
          <MinTimeBetweenStrafeDirectionChanges value="5.00000000"/>

    Loosening up some of the values might allow the AI to accomplish the task successfully etc.

  • @a63nt-5m1th so in combattasks.ymt which one do i increase tho...?

  • @idkwhoitis
    I'm not sure if it's possible or not, that whole post is just things that might have something to do with it/areas for the op to research/test out etc.

  • @a63nt-5m1th thx for the info

  • @a63nt-5m1th well, mine didn't work though :c

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.