Jump to content

Recommended Posts

Hi all,

 

I am having an issue figuring out something that should be pretty easy (oh, but the ME is NEVER easy!). I want to have logic in a MP mission that can detect if a plane has flown over a recon target, and then only award the credit for completing the recon when they land safely at their base. So far I have the following:

 

triggers.thumb.jpg.8d04a2818202e33e09f56aa3e9455c1a.jpg

 

Plane flies over recon target -> complex trigger (A) detects plane's OnEntered event and activates another trigger (B) at the base -> complex trigger at base is set to award recon when plane is Stationary and Alive (i.e. landed somewhere near the aerodrome) inside the trigger.

 

Right, so this all works fine, but already we have a potential bug: if another player plane with the same name, or of the same type (depending on what we are checking in the triggers) spawns at the home base after this second trigger has been activated OR the recon plane is killed after activating the base trigger(B) and then respawns at the base, it will trigger the OnStationaryAndAlive event and falsely award the recon. No good. Is there a better way to detect the successful landing of the recon plane ?

 

Then we also have to deal with cases where the recon plane flies over the target, but is killed before returning to base. If he is killed inside the first trigger (A), its no problem because we can detect this and disable the second trigger again. But what if he flies off and is killed miles away? Then the second trigger is still active and, again, when he respawns in the same plane back at base he will activate the recon even though he didnt complete it. The only partial solution I can think of for this is to have another complex trigger than encompasses the entire mission map, and then use that to watch for the death of the recon, but again there is an issue: I can either detect the death of his plane type, or his plane name, but what if I have 5 planes named "pe2recon"  for example? then the death of any of them will break the logic, even if I use the name of the aircraft.  Soooo.. does anyone know how to do this? I have seen it done in RoF missions, so there must be a way but I just cant figure out a foolproof way to ensure that the recon is ONLY awarded if the plane completes the mission.

Share this post


Link to post
Share on other sites
Posted (edited)

This is a good example of crazy complex events that don't really work well in dogfight multiplayer mission.

 

However, what you're creating will work well in single and cooperative missions though. Bbbuuttt lets assume you still want to build this logic for a dogfight server.

 

You need to have logic for when the recon plane enters the area, which you do have already - onEnterReconArea. Then, you need to activate another complex trigger that has a much larger radius. This complex trigger - we'll call onReconPlaneKilled - will check to see if the player in the recon plane was shot down.

 

Additionally, your original onEnterReconArea complex trigger needs to instantly be disabled so no second plane will activate it (no matter the name of the plane). You can do this with a simple deactivate MCU from the complex trigger to the complex trigger. And this same trigger needs to activate the onReconPlaneKilled complex trigger, and the onSuccessfullyReturnedtoBase complex trigger. Whew!

 

The onReconPlaneKilled complex trigger will constantly check to see if the recon player was shot down or left the radius of the area. If so, then it notifies all the players that the recon plane was shot down, and that they'll need to perform the task again. This complex trigger will also deactivate the onSuccessfullyReturnedtoBase, and itself; while also activating the original onReconPlaneKilled.

 

Like all complex events in a dogfight mission, you should sprinkle in a health dose of icons and subtitle messages, so players know the status of the task.

 

While all this is going on, shit can break (as you stated) because what if this or that edge case happens... Well, this is why it doesn't work well in dogfight servers. If you do have an edge case (like another recon plane getting killed while onReconPlaneKilled is active) happen, then always attempt to default your logic back to the beginning of your logic. In this case, everything resets, and another recon plane must fly into the onEnterReconArea complex trigger again. Players won't mind, and are general none the wiser.

 

When I get a chance, I'll post an example of how I would tackle this logic, and give you the group. Or maybe someone else will beat me to it. 😎

 

Questions? Fire away.

 

Edited by ACG_Sketch-LW
Grammar cause my phone hates me

Share this post


Link to post
Share on other sites

Easy :

Name your recon with a number as : Recon01, Recon02

 

Then, in your briefing, say that Recon01 must be used if you fly over recon area A.

 

With that, you can activate one complex trigger by Recon which land.

 

So,  on area A, player must use Recon01

 

CT on area A (set on plane Recon01) ---> If recon ok ---> Activated ----> CT on airfield (set on plane Recon 02)

 

If you have 3 Recon area, you 'll have 3 planes in the Airfield selection named Recon01, Recon02, Recon03 and 3 Complex triggers on the airfield, one by Recon plane.

 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

But what if I want to fly recon plane 1? This server sucks!!! - every player not in a recon plane

Edited by ACG_Sketch-LW

Share this post


Link to post
Share on other sites

When i wrote :   If you have 3 Recon area, you 'll have 3 planes in the Airfield selection

 

In your plane selection from the airfield, you'll have for example 3 plane dedicated for Recon (Recon01, 02,03) and generic plane for a player who doesn't use recon. The goal is that player do not take Recon plane for other things. And if they did it, they know that they can achieve the recon. So Player have to escort and support the recon, to avoid to lose it. 

 

For recon plane, i set only 2 or 3 planes available. I join a screenshot which will be easier to understand that my english.

 

 

 

 

STEditor_2019-05-25_08-00-50.jpg

Share this post


Link to post
Share on other sites
16 hours ago, ACG_Sketch-LW said:

This is a good example of crazy complex events that don't really work well in dogfight multiplayer mission.

 

However, what you're creating will work well in single and cooperative missions though. Bbbuuttt lets assume you still want to build this logic for a dogfight server.

 

You need to have logic for when the recon plane enters the area, which you do have already - onEnterReconArea. Then, you need to activate another complex trigger that has a much larger radius. This complex trigger - we'll call onReconPlaneKilled - will check to see if the player in the recon plane was shot down.

 

Additionally, your original onEnterReconArea complex trigger needs to instantly be disabled so no second plane will activate it (no matter the name of the plane). You can do this with a simple deactivate MCU from the complex trigger to the complex trigger. And this same trigger needs to activate the onReconPlaneKilled complex trigger, and the onSuccessfullyReturnedtoBase complex trigger. Whew!

 

The onReconPlaneKilled complex trigger will constantly check to see if the recon player was shot down or left the radius of the area. If so, then it notifies all the players that the recon plane was shot down, and that they'll need to perform the task again. This complex trigger will also deactivate the onSuccessfullyReturnedtoBase, and itself; while also activating the original onReconPlaneKilled.

 

Like all complex events in a dogfight mission, you should sprinkle in a health dose of icons and subtitle messages, so players know the status of the task.

 

While all this is going on, shit can break (as you stated) because what if this or that edge case happens... Well, this is why it doesn't work well in dogfight servers. If you do have an edge case (like another recon plane getting killed while onReconPlaneKilled is active) happen, then always attempt to default your logic back to the beginning of your logic. In this case, everything resets, and another recon plane must fly into the onEnterReconArea complex trigger again. Players won't mind, and are general none the wiser.

 

When I get a chance, I'll post an example of how I would tackle this logic, and give you the group. Or maybe someone else will beat me to it. 😎

 

Questions? Fire away.

 

 

Thanks for this Sketch and Habu, and it does all make sense and was kinda what I was thinking and alluding to in my last paragraph about one big checkzone, but I'm still not clear on how we measure the successful landing of the recon plane reliably. Surely, if we use OnStationaryAndAlive event, and another player spawns into the checkzone, it will award the recon? Habu's idea of using specifically named recons that can only do one task is easier, but quite restrictive as you said. I suppose I could have a checkzone for each recon over each target and then only activate the airfield checkzone for that one recon at the airfield depending on which recon flew over the target. So something like this:

 

Home airfield has 3 checkzones for 3 recons, all disabled at mission start. Player takes off in recon01 and flies over target A, over which there are 3 active checkzones (recon01,recon02,recon03). recon01 checkzone triggers for recon01,  which triggers recon01 landing checkzone at the base. All other landing checkzones remain inactive at the base. Then we use the bigger checkzone logic as you said Sketch to figure out if he died along the way. Then when he lands he is awarded the recon, and no other plane spawning in will activate the checkzone because the names are different. The issue with this is it requires many active checkzones to work - 3 over each target. What if I have 10 potential targets? I suppose I could activate and deactivate the target checkzones dynamically as the mission allows, but that is going to get complicated very quickly..hmm

 

I have seen this logic work quite well in the Flanders in Flames RoF missions, so maybe the best option would be to find out who did those and see if they could send me the group..

Share this post


Link to post
Share on other sites

I'm not a fan of a big check zone because it takes more resources.

 

As i understand, you want that any Recon plane can do any Recon area which give you as CT as you have Recon plane. But if in the briefing You said Area A can be Recon only by Recon01. That's how i proceed. You have only one CT by recon Area. But Player must read the briefing.

 

 

  • Thanks 2

Share this post


Link to post
Share on other sites
6 hours ago, Habu said:

I'm not a fan of a big check zone because it takes more resources.

 

As i understand, you want that any Recon plane can do any Recon area which give you as CT as you have Recon plane. But if in the briefing You said Area A can be Recon only by Recon01. That's how i proceed. You have only one CT by recon Area. But Player must read the briefing.

 

 

 

Yes, that is my concern as well. I dont know how many resources a checkzone uses, or how many of them we can have active at any time, but I would want to keep the number of checkzones to a minimum..

Share this post


Link to post
Share on other sites

There are no limits for checkzone and complex trigger. The limit is the hardware of your server. If i remember (didn't check), on some of my dogfight mission, i can have between 15 and 20 complex trigger.  But i activate and deactivate them when i need it or not.

 

When you begin a mission (as a beginner with not a lot experience), do not think about optimization when you build your group. Do your mission, run it, and if the mission do what you want, then you can think about optimization. Optimization is something which should come after you validate that everything is fine.

  • Upvote 1

Share this post


Link to post
Share on other sites

For what it’s worth, Combat Box has dozens of (non-complex) check zones for each map and the server is fine for 60-odd players. I find AI units such as tanks, ships and AAA are much more resource-intensive, relatively speaking. Server is an 8600K @ 4.8ghz AVX-2.

 

Complex check zones are a different beast I expect, but still likely way less resources than an AI.

 

Another possible suggestion: drop the “you must return home” requirement and use a flag instead to ensure the player does a recon for enough amount of time. It’s not the same mechanic of course but simpler and might still give a similar feel for the mission.

  • Upvote 1

Share this post


Link to post
Share on other sites

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...