Jump to content
Sign in to follow this  
Sekra

How to make AI tank fire HEAT shells?

Recommended Posts

I've been making a mission where a T72 is working as a mobile artillery unit, shelling on a city from a big distance.. But I'm having trouble making the tank shoot HEAT shells, I can only make it shoot SABOT.. Heres the line of code I've been using to make the tank shoot:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">tank fire "D81"

and I've tried using different kinds of combinations using the Wiki weapons & ammo list but it only fires with that command.  banghead.gif  I know I could just use a script to create shells dropping in the town but I've tweaked a script and the mission quite hard for the tank to actually shoot into the town from quite a distance. So if anyone could help me to make the tank shoot HEAT shells I'd appreciate it very much. Thanks in advance for any help I get!

EDIT: Well of course now that I try harder and harder I found a way.. If anyone ever needs to do this same thing this is how I solved it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

tank removemagazines "23Rnd_125mmSABOT_T72";

reload tank;

tank fire "D81";

this removes all the SABOT ammo from the tank and then makes the gunner reload the gun with the HEAT ammo.. of course there is a small delay after the reload as the gunner is reloading the new ammo so you might add a sleep command there before fire...

Share this post


Link to post
Share on other sites

Hmm i think you have to use  doTarget and then sendsimplecommand "fire" im not 100% if this would work

Share this post


Link to post
Share on other sites

it has a target it is shooting "at".. its not a question of getting the tank to shoot.. it will fire the main cannon with the script I'm using, just that it fires the "wrong" kind of shells, ie SABOT instead of HEAT..

Share this post


Link to post
Share on other sites

And I cannot get them to fire at infantry with proper ammo either. Tried abot 100 times.

If some one could come up with a work around this it would be most appreciated.

Share this post


Link to post
Share on other sites

well.. Törni, have you tried giving the unit you want it to target a name like s1 and name the tank too.. Then order the T72 to

tank dowatch s1; sleep 1; tank fire "D81"

or replace the "D81" with "M256" for Abrams.. Make this as a radio trigger for example to test the functionality of this.

Or then you could download the mapfact misc addons and make a script that has an invisible armor target that will be periodically set at the coordinates of a soldier and make the tank shoot at that..

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  

×