Jump to content
ChlckenWlng

Is there a way to tell a AI to raise the barrel of a artillery by a number of degrees?

Recommended Posts

So like when I enter a trigger I want that the AI that is sitting in a artillery raise the barrel by some degrees and then shoot.

If anyone knows another way make a AI shoot with a artillery on a target from like 200m please tell me.

 

Why do I need this? I am trying to make a mission with a BM-21 artillery and I want it to shoot at a target inside of the minimum shooting range like 100m away or something like that.

I can use doArtilleryFire but it will only work if the target is above the minimum shooting range

Share this post


Link to post
Share on other sites

You can also work with a simple parabolic formula for bullet  trajectories, since arma doesn't simulate coriolis force, earth curvature or air friction for bullets.

This page has saved me many headaches, heh.

You can get all values either from config (ammo muzzle speed at launch, etc.)  or from model (barrel direction vector),  just make sure you're using ASL positions.

This way your artillery gun will be able to do direct fire and actually hit its target.

 

Cheers

  • Like 3

Share this post


Link to post
Share on other sites

Or make your own class of BM-21 with dependencies but the limit of your own (turret) artillery .

something like that.

That means a little mod and authorization of the BM-21 creator.

Share this post


Link to post
Share on other sites

Another possibility is to have them target an invisible target object (you can find them in the editor), and setpos that object high up in the air.  Maybe they will adjust barrel up to target it.  But Grumpy's solution will work.  You can hijack the fired projectile and give it its own path (more advanced scripting though).

On 6/10/2020 at 10:30 AM, Grumpy Old Man said:

You can also work with a simple parabolic formula for bullet  trajectories, since arma doesn't simulate coriolis force, earth curvature or air friction for bullets.

This page has saved me many headaches, heh.

Wow, thanks for the great link Grumpy.  Bookmarked!

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×