Jump to content

Can't stop Command:Cover MCU


Recommended Posts

AEthelraedUnraed
Posted

I'm having a bit of a problem where an aircraft formation won't stop covering the player flight. The logic looks like this (unrelated stuff deleted and moved around a bit):

il2cantstopcover.thumb.PNG.a206de584c7a601b62af170159f6010d.PNG

Baffin is the player flight, with the player being no.3 in the formation. Sometime after takeoff (which was deleted from the picture), Baffin and Mitor reach the waypoints at the bottom center of the image (id 609 for Mitor). For Mitor, this triggers the Cover MCU (id 559) with Mitor as object and Baffin as target. The player then proceeds to fly a little further and then does two Attack Ground MCUs in quick succession (the clutter in the bottom right corner). Once these attacks are finished but after at most 3 minutes, Baffin_RTB (id: 357, center of the image) is triggered, which in its turn does a Force Complete for the player (id 358) followed after a short delay by a Waypoint near the airfield (id not shown, but top left corner). It also enables a CheckZone (id 359) that's triggered when the player flies within 30km from the airfield.

 

So far so good. Everything runs as expected, even the pretty scripting-heavy clutter at the bottom right.

 

Now the strange stuff starts. This CheckZone triggers Mitor_RTB (id 378, left center, 1x counter) which in turn triggers a Force Complete for Mitor and after a 3s delay, a Waypoint near Mitor's airfield (left center). It furthermore enables a Proximity trigger (id 563, left center) that disables Mitor once it gets beyond visual range, to save CPU. Mitor is also disabled once it reaches its final waypoint mentioned above. When troubleshooting this issue, I also added a Disable MCU (id 564, left center) that disables the Cover command, just to be sure.

 

The problem now is that Mitor never stops covering Baffin. MESSAGE (id 380, top left corner) is shown, so this confirms that the 30km CheckZone (id 359) works. Still, neither the ForceComplete MCU nor the Disable MCU make the blasted Mitor flight cancel their Cover MCU (id 559) and return home. Instead, it remains with Baffin all the way to the airfield.

 

Anyone any idea?

Posted (edited)

Ignorant shot-in-dark:  can differences in priority levels cause the cover command to override the force complete?

 

Hmm, the deactivate Cover and Force Complete are happening at the same time?  Should the Force Complete have a timer to wait to ensure the Cover is deactivated, then Force Complete?

 

I'm just totally guessing crap...  

 

Edited by dbuile
AEthelraedUnraed
Posted
2 hours ago, dbuile said:

Hmm, the deactivate Cover and Force Complete are happening at the same time?  Should the Force Complete have a timer to wait to ensure the Cover is deactivated, then Force Complete?

 

I'm just totally guessing crap... 

I didn't try with a delay on the Deactivate, but I don't think it should matter? I don't really care which of the two is the reason the AI stops following the Cover MCU, as long as it happens.

 

What definitely doesn't work is just the Force Complete; that's what I had initially.

AEthelraedUnraed
Posted

No-one else? ?

Posted

Okay, I'm by far not an expert in this department, but I take it that your intent is to have Mitor break-off his cover and at some point be disabled/deleted. If that is true, then why not just disable/delete Mitor when the check zone gets triggered? I'll look some more later on after I have a few morning coffees and my brain starts to function.

AEthelraedUnraed
Posted
4 minutes ago, No_85_Gramps said:

Okay, I'm by far not an expert in this department, but I take it that your intent is to have Mitor break-off his cover and at some point be disabled/deleted. If that is true, then why not just disable/delete Mitor when the check zone gets triggered? I'll look some more later on after I have a few morning coffees and my brain starts to function.

Yes, at some point I want to delete Mitor, to save CPU cycles. The reason to not disable them right away, is that they're in view of the player at the time. I only spawn/delete aircraft either outside of visual range, or behind cloud cover if possible.

  • 2 weeks later...
Posted

Hope this helps, I always use it when I cant stop events....Sketches group MCU...

 

image.thumb.jpeg.3893d6e971fcb08bff7f77adbc3e11ac.jpeg

AEthelraedUnraed
Posted
6 hours ago, Monty_Thrud said:

Hope this helps, I always use it when I cant stop events....Sketches group MCU...

Yeah that's similar to the logic I use. But thanks anyway :)

 

P.S. your Cover Command (id:11) has got the object and target links switched ;)

 

Anyhow, maybe one of the "usual suspects" @Sketch or @Jaegermeister can still think of some advice? Otherwise I'll blame it on some kind of AI bug and just keep the covering flight there throughout the whole RTB/landing sequence.

Jaegermeister
Posted

Deactivating the Command Cover and then triggering a Force Complete “high” just after should end the cover command. The only reasons I can think of that it wouldn’t work are a media MCU running at the same time, or your waypoint priority after is too low.

 

You can “cheat” and trigger an attack area MCU for Mitor, and then deactivate that. The attack area will override the cover command. You might also delete the logic and place it again, just to make sure nothing is backwards by mistake.

 

There is nothing wrong with your logic approach, so it must be something else

  • Thanks 1
AEthelraedUnraed
Posted
37 minutes ago, Jaegermeister said:

The only reasons I can think of that it wouldn’t work are a media MCU running at the same time

Wait - a running Media MCU stops a Force Complete from working? I didn't know that! My mission is pretty media heavy (I'm planning custom radio calls like in Gambit's Hell Hawks campaign) so that might very well be the problem. I'll adjust my logic accordingly and report back.

Jaegermeister
Posted
3 hours ago, AEthelraedUnraed said:

Wait - a running Media MCU stops a Force Complete from working? I didn't know that! My mission is pretty media heavy (I'm planning custom radio calls like in Gambit's Hell Hawks campaign) so that might very well be the problem. I'll adjust my logic accordingly and report back.

 

Yes, other MCU commands don't work when a Media Player is running.

  • 2 weeks later...
AEthelraedUnraed
Posted
On 1/31/2023 at 12:40 PM, Jaegermeister said:

Deactivating the Command Cover and then triggering a Force Complete “high” just after should end the cover command. The only reasons I can think of that it wouldn’t work are a media MCU running at the same time, or your waypoint priority after is too low.

 

You can “cheat” and trigger an attack area MCU for Mitor, and then deactivate that. The attack area will override the cover command. You might also delete the logic and place it again, just to make sure nothing is backwards by mistake.

 

There is nothing wrong with your logic approach, so it must be something else

Thought I'd update you on this issue. Delaying the Force Complete until 1s after running a Stop Media command didn't work. Your "cheat" did, however.

 

I'm still a bit baffled by the whole issue, but at least it works now.

Jaegermeister
Posted (edited)
5 hours ago, AEthelraedUnraed said:

Thought I'd update you on this issue. Delaying the Force Complete until 1s after running a Stop Media command didn't work. Your "cheat" did, however.

 

I'm still a bit baffled by the whole issue, but at least it works now.


If you want to send me the file I can take a look at it. PM a link if you don’t want to post it here

Edited by Jaegermeister

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...