Jump to content
Sign in to follow this  
Fuzzy Bandit

Calling off Air Support

Recommended Posts

Hello!

Ok, straight down to brass tax - here's the low-down.

Cutting out other variables which happen throughout the mission (e.g. changing the availability of the air-strike), the layout's quite simple.

I've got an A-10 squadron positioned to the far south of my position. They've been assigned to circle (Making them take off from an airstrip seems like an impossible task!) around a "Move" waypoint until "Radio Alpha" (labelled "A-10 Support") is activated. At this point they move to their next waypoint, a "Seek and Destroy" waypoint at an enemy airfield north of their position. Positioned at the airfield are a number of BMPs, trucks, infantry and empty aircraft.

Now, what I want the A-10s to do is keep circling and attacking until the BMPs (there are two of them, lets call them "target1" and "target2") are destroyed. After the two BMPs are destroyed, the A-10s should ignore any more enemies and bug out back down south, leaving you and your squad to clear the rest of the airfield.

So far (doing this by memory as I'm not at my home computer at the minute!) I've tried putting a trigger over the airfield with the (around-about) following Condtion code:

(!alive target1) AND (!alive target2)

And then in the "On Act." box I've put something to the effect of:

a10_1 setCurrentWaypoint [a10_1, 2]

Waypoint 2 is the "Move" (bug out) waypoint.

So, can anyone help me out?

Just to clarify, I want A-10s to fly in (after using Radio Alpha) and just attack an enemy base, and when 2 target BMPs are destroyed, move on to the next waypoint regardless of any enemies.

As an interrogative, at what point of damage is a BMP considered disabled, causing the crew to leave the vehicle? I know the "getDammage" condition, but not sure how much the vehicle can be damaged before the crew exit.

Thanks in advance for any help!

Cheers,

Jack.

Edited by Fuzzy Bandit
Changing font size quickly

Share this post


Link to post
Share on other sites

Apologies for this, but BUMP.

I did have a quick think, however. Would it be a good idea to maybe split the group of four A-10s into two groups of two A-10s. Then, set each group a "Destroy" waypoint on top of (therefore attached to) each BMP target. Would they then move on to the next waypoint after their target is destroyed?

Cheers again for any help.

Share this post


Link to post
Share on other sites

Potentially that could work if they're not set to engage at will. I'm not sure about getting the AI to break contact. If their destination waypoint is set to careless and never fire mode that might do the trick, but it equally might not. You can try using doTarget objNull on each aircraft, maybe.

It might also be neater to make the attack waypoint just a move waypoint (with fire at will etc. selected), and put the condition in there. i.e. so it won't complete the waypoint until the two targets are destroyed. Not sure if that will work better or worse than the trigger. You could also make the trigger a "Switch" type and synchronise it with the S&D waypoint which will also have the effect of causing them to move to the next wp.

Regarding the BMP being "disabled", I'm not sure on the exact damage level. If they're definitely occupied by AI then you could perhaps change the condition to

(isNull gunner target1 or !alive target1) && (isNull gunner target2 or !alive target2)

, i.e. they stop attacking it once the gunner bails or it's destroyed (not sure what "gunner" returns on a destroyed vehicle).

---------- Post added at 10:18 PM ---------- Previous post was at 09:59 PM ----------

I've gotten this to work successfully using a trigger that sets the next waypoint, if that waypoint has it set to careless mode AND the trigger also does a doTarget objNull on the a10. If you don't want to use careless mode (might turn on nav lights at night), you can perhaps play around with disableAI and disable target and/or autotarget to see if that achieves the same effect.

---------- Post added at 10:19 PM ---------- Previous post was at 10:18 PM ----------

Also as an aside, is a10_1 a unit or group name? The waypoint commands work on the group and throw an error if used on a unit.

---------- Post added at 10:43 PM ---------- Previous post was at 10:19 PM ----------

Okay, I haven't been able to get it to work reliably with the above method. It looks like the best way is to use unit disableAI "AUTOTARGET" as soon as possible after the target unit becomes destroyed/disabled, then follow that up with unit doTarget objNull.

I'd probably go so far as to hook the Killed and GetOut events for the two units of interest and use them to abort the attack; although the trigger is probably run often enough to be sufficient.

It seems like "doTarget objNull" takes a while to take effect, and sometimes I get the feeling that it just makes me feel good to have it there and it's not actually doing anything at all. :)

An alternative approach might be to have the A10's start with their AUTOTARGET AI disabled, and have the script command them to target the appropriate targets. However if you do that, they won't engage anything else which might not be the effect you're wanting.

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  

×