Jump to content
Tiberius_161

How to give artillery computer input via script?

Recommended Posts

Hi all,

 

Is there a way to give input for the artillery computer without actually opening it and clicking on the map?

 

the goal is that the player manned artillery piece is given a selection of targets. If he selects one the gun should lay itself to be able to fire on that target. Basically in the way that the artillery computer works.  

Is this even possible? 

 

Any advice would be greatly appreciated. 

 

Cheers

Tiberius

Share this post


Link to post
Share on other sites

Hey there,

 

I am a bit confused on your use case. If you let the mortar be manned by AI, and use doArtilleryFire, then it will automate the aiming for you for (any) given target. This can be triggered by radio command, for instance.

Share this post


Link to post
Share on other sites

Hi 

On 1/24/2023 at 5:13 AM, Melody_Mike said:

Hey there,

 

I am a bit confused on your use case. If you let the mortar be manned by AI, and use doArtilleryFire, then it will automate the aiming for you for (any) given target. This can be triggered by radio command, for instance.

 

Hi Melody_Mike,

 

Thnx for your reply.

 

What I mean is that if the/a player is in the gunner seat of a mortar or artillery piece and uses the default artillery computer, the gun automatically lays/aims itself. I am trying to actieve the same but without actually using the artillery computer. 

 

Perhaps my question should be: how does the artillery computer give commands to the gun and can I give similar input to a player manned gun via a script?

Share this post


Link to post
Share on other sites

I believe with animateSource and animateSourcePhase.
 

There are plenty of attempts to hand calculate artillery. This is one (I have not tested):

If you look into fn_firemission.sqf, there's some explanation of how it calculates the 'firing solution'.
There are other scripts, but often the download links are no longer valid.

You can also choose to reverse-engineer this spreadsheet:


Or use someone else's mod:

 

  • Like 2

Share this post


Link to post
Share on other sites
21 hours ago, Melody_Mike said:

I believe with animateSource and animateSourcePhase.
 

There are plenty of attempts to hand calculate artillery. This is one (I have not tested):

If you look into fn_firemission.sqf, there's some explanation of how it calculates the 'firing solution'.
There are other scripts, but often the download links are no longer valid.

You can also choose to reverse-engineer this spreadsheet:


Or use someone else's mod:

 

Thnx for the suggestions. I'm sure this will help! 

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

×