hmm, i thought shells had a longer timepout than 20 seconds.
the 50 cal machine gun times out after 20 seconds, but i think cannon shells fly for a longer duration. nevertheless, your idea with deleting the shell, creating a new one, and giving it a setvelocity is a much better, more flexible, and more practicle way of doing it. the problem with the old direct artillery script is that the script would only calculate for a very shallow firing angle (nothing over 20-30 degrees) so the minimum range for a fire mission was like 2000 meters, and the max range was 4000 and if there was anything like a hill in the way or forest, than the shells would blow up prematurely. Also, you couldnt set the battery any higher than the target, cuz the script wouldnt calculate for that, also, the barrels of the tanks dont go over 45 degrees, so an indirect lobshot is pretty impossible (if you wanted to lob a shot over a very short range, at a target that cant be hit directly, say, over a hill)
with a setvelocity, you can VERY easily figure out the trajectory to the target, and make the round fire at a 0-90 degree path, with any ammo, from any position, as frequently as you want, with out having to worry about having the ai shoot anything. Also, the calculations for setvcelocity are much more simple, theres no drag calculated into setvelocity, and you dont have to worry about simulating gravity, so your pretty much all set. Someone please make a script for this lol