Home   Help Search Login Register  


Author Topic: AI shoots too high with launchers  (Read 1683 times)

0 Members and 1 Guest are viewing this topic.

Offline flashist

  • Members
  • *
AI shoots too high with launchers
« on: 12 Mar 2014, 12:32:53 »
Hi guys,
I have little problem with LAW, RPG NH-75 and RPG7 in my mod.
When AI engages a tank they are shoot too high and it turnes them completely useless against enemy armor.
I've checked this via intro in editor : placed soldier with launcher and used his view by setting control by player and tank about 100 meters in front. And every time he tries to shoot a tank he aims too high.
What is going on?

heres the part of config
is something wrong here?
   class LAW:AT3

   class RPG:LAW

   class RPG75:LAW
   class LAWLauncher:Default
      magazineType="2 *       256";
      displayName="M72 LAW";

   class RPGLauncher:LAWLauncher

   class RPG75Launcher:LAWLauncher

Ok i know that this question is propably too difficult to answer forr You, so i tried to solve this problem by myself. I was editing thrust and thrustTime several times and i've get to a point where AI shoots correct (they were taking a gravity correction byt rockets didn't fall down properly) but ie. LAW slows down to almost 0m/s after travelling max 500 meters and after that explodes in the air.Is it because of wrong proportions of thrust , thrustTime and mass in geometry lod of the rocket model?

Thanks for your help guys. I've fixed it by myself. I'm plannig to release this mod it has some features i've never seen before, but according to activity of the OFPEC community i wonder does it have any sense.
« Last Edit: 27 Mar 2014, 13:39:22 by flashist »

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: AI shoots too high with launchers
« Reply #1 on: 17 Apr 2014, 17:44:08 »
I think if you increase the maxspeed the AI will shoot lower. You have to mess with the initspeed, maxspeed and thrust to get optimum AI performance. The problem is that somtimes when it works right for AI, then the player might have problems. You can make different AI ammo than player ammo and use an init event handler to check if the unit is a player. If they are a player, then swith their ammo to the player version. You can check out my MAAWS "Carl Gustov" addon http://www.ofpec.com/forum/index.php?topic=36319.msg248980#msg248980 to see how I made some rockets work for both AI and player units.
« Last Edit: 20 Apr 2014, 20:50:57 by Raptorsaurus »

Offline flashist

  • Members
  • *
Re: AI shoots too high with launchers
« Reply #2 on: 28 Apr 2014, 13:10:23 »
Thanks, but i am planing to use as less scripts as possible, only the necessary ones.I will try to mess up with maxspeed etc today and i'll see what will happen. I suspect that  "distanceZoomMin" and "distanceZoomMax" does matter too because of wrong zeroing. Am i right?

Offline flashist

  • Members
  • *
Re: AI shoots too high with launchers
« Reply #3 on: 08 May 2014, 10:54:09 »
I was trying and didn't get a wanted effect. Ai was still shooting too high or missiles were flying short distances and explode after i.e. 500m, so i decided to return to BIS values and slightly tweaked them. For now i have more important things to do in my mod, so when i'll have some free time i will try to mess up with that. Now i have different questions:
1)How to make script that recognize what part of soldiers body were hit?
2)how to make Ai stop shooting at wounded soldier (it is for let the wounded troop play some "suffering" anim like in FFUR)?

I'm a greenhorn in scripting but i think i know the answer for the second question - when soldier is hit then script assign him to the civilian side or better SetCaptive, and when the anim ends or when he dies return to his previous side.Is it possible?
« Last Edit: 08 May 2014, 13:52:11 by flashist »