Jump to content
Sign in to follow this  
masonkiller

Artillery Aiming?

Recommended Posts

Is there a way, within an sqf script, to have the artillery take aim at a position (in format [x,y,z] of course) so when it fires the rounds come down from above?

I've tried lookAt but you have to make the gun point up and then its guess and check to try to get the rounds to land anywhere within a mile of the target.

I'm trying to make a small "from scratch" script that has artillery fire at a predesignated spot after being triggered. I would know how to do the rest if I just could figure this part out.

So maybe if I knew what the artillery module uses for the first step of a fire mission when the guns take aim I could use that for my script. Any help or advice you guys can give I would greatly appreciate! :)

Share this post


Link to post
Share on other sites

why not just fake it???

create a invh h or gl at a approx height in the direction to the target and then dowatch that.

then fire and collect and delete "bullet" with a fired eventhandler and then spawn a shell at real target area at max precision..

Or better, just use the arty modules as they work nicely ;)

Share this post


Link to post
Share on other sites
So he has an actual script in there that calculates trajectory and whatnot?

I'm pretty sure it does. It's an intense script. It seems to be the best one out there...at least the most advanced.

Share this post


Link to post
Share on other sites

I'm just surprised BI doesn't have a command to use that aims the weapons

Oh and while I have you, how do I get the laser designator position to work in a script? I tried _ArtyArea = position laserTarget player;

but the script doesn't run

---------- Post added at 01:34 ---------- Previous post was at 00:22 ----------

why not just fake it???

create a invh h or gl at a approx height in the direction to the target and then dowatch that.

then fire and collect and delete "bullet" with a fired eventhandler and then spawn a shell at real target area at max precision..

Or better, just use the arty modules as they work nicely ;)

What I've been doing is using createVehicle and setting the z position at about 7500-9000. That way the artillery rounds were coming down pretty fast. Is there a way to have the rounds "pre-accelerated" so they are moving quick right when they are spawned?

Edited by masonkiller

Share this post


Link to post
Share on other sites

Just create a arty template and tell the battery to execute a fire mission.

// Mission template.
_heTemplate = ["IMMEDIATE", "HE", 0, 15];

// Execute Fire mission
[battery, targetPosASL, _heTemplate] call BIS_ARTY_F_ExecuteTemplateMission;

all the info you need to do it here :

http://community.bistudio.com/wiki/Artillery_Module#Creating_fire_missions

Share this post


Link to post
Share on other sites

Yeah I've used the artillery module before but its not exactly what I'm looking for but thanks. I've decided to opt for what Demonized said about faking it. So I mainly want to know about if there is a way to do a createVehicle and have it spawn with an initial acceleration and possibly direction.

Share this post


Link to post
Share on other sites

use the setvelocity command to acellerate them, maybe in combination with setVectorDirAndUp.

or simply setPos them down in a very quick loop. (recomended)

while {(getPos _bullet select 2) > 0.3} do {
  _pos = getPos _bullet;
  _bullet setPos [_pos select 0, _pos select 1; (_pos select 2)-0.1];
  sleep 0.01;
};

experiment with different values to get good result, as gravity is slow in arma when just spawned in air.

Edit, in the above setPos example you can also offset it a little as well in any direction to simulate a arc and not direct drop down, but if its fast i dont see it as anything other than frosting, because noone will probably see it?

Edit: changed alive in while loop to height check instead.

Edited by Demonized

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
Sign in to follow this  

×