the_demongod 31 Posted October 28, 2013 Hey guys, have searched a bit but found nothing even remotely like what I'm looking for: In one of my missions, I would like to trigger some artillery to fire. I know how to do this, I am using commandArtilleryFire and it is working quite well but the thing I don't like is the behavior of the Sochors that are doing the shooting. The player is near the vehicles when they fire, so the effect of them firing is the important part. What I want is for the Sochors to be aimed at the targets the entire time, and when I call the commandArtilleryFire in a trigger, they each fire one shell. What I am getting now, is that they all sit, guns level. When I call the script, they all turn and look about 100 degrees backward and to the left, and then they quickly raise their cannon, acquire their targets and fire, and immediately move their guns back to the level position. This all happens in about 5 seconds. Needless to say, it looks a little silly. Is there some way I can have the Sochors acquire their targets first, and then wait for the commandArtilleryFire script before they fire? Or at least have them start with lowered guns, then slowly raise them and fire, without all the turning involved? Thanks! ave, the_Demongod Share this post Link to post Share on other sites
f2k sel 164 Posted October 28, 2013 You can try a few things. Try having the unit watch the target before firing gunner tank dowatch [getpos targ select 0,getpos targ select 1,3000] this should have him raise the gun and stop the commander searching for the target. then issue the fire command. There is an issue though it always seems to fire three rounds even if set to one. You may have to remove all ammo and just give it a single round. If you must have the gun raise slowly then you would need to run a script where _inc would increase slowly over time for "_inc" from 0 to 3000 step 10 do { gunner tank dowatch [getpos targ select 0,getpos targ select 1,_inc]; sleep 0.03; }; Other things you can try are remove the commander from the tank or un group him [commander tank] join grpnull also disabling AI targeting may help tank disableAI "target";tank disableAI "autotarget"; Share this post Link to post Share on other sites
the_demongod 31 Posted October 28, 2013 thanks for the fast reply mate. I'll try these things when I get home. ave, the_Demongod Share this post Link to post Share on other sites
the_demongod 31 Posted October 29, 2013 thanks dude, the first one got me what I wanted I put gunner arty dowatch [markerpos "target_marker" select 0, markerpos "target_marker" select 1, 9500]; Where arty is the name of your artillery vehicle, without quotes, parenthesis, or anything; I used markerPos because the target was a marker on the other side of the island and it lined up nicely with my commandArtilleryFire script; and "target_marker" was the name of the marker it was to aim at, in quotes. I had to use this in conjunction with my commandArtilleryFire command, and kind of guess-and-check to see what the value had to be so that when told to fire at the marker, it had already elevated to where it needed to in order to fire. From Stratis airbase to kamino firing range, this elevation value happened to be 9500, but it depends on the range of the target. Share this post Link to post Share on other sites