Jump to content

Check Zone and Proximity triggers in MP


Recommended Posts

Posted

Hi, 

I would like to check if a plane enters an area in MP . I have done it using Complex Trigger ---> Timer ---> MCU Command.

 

How to do it using Check Zone or Proximity (in multiplayer mission)? What is the difference between two of them?

 

Thanks.

 

 

Posted

I remember someone saying check zone was for SP only?

 

Not sure, there might be some info if you use the search function

Posted (edited)

No, Checkzone now also works in MP!

 

The difference is that with Complex trigger it is possible to filter on specific aircraft (name, country, type) whilst Checkzone you can only trigger on Allied or Axis, but it uses less CPU cycles, so you can use more in a mission. 

Edited by SYN_Vander
Posted

Ok but how? It doesn't work in my mission. How to connect it?

Posted

Thanks!

 

I should have connected MCU Proximity/CheckZone with an object. Now it works!!

Posted

Thanks!

 

I should have connected MCU Proximity/CheckZone with an object. Now it works!!

 

For proximity: Yes, for CheckZone it's not needed to connect to an object, so it will trigger on any object entering/leaving the area.

  • 4 weeks later...
Posted (edited)

No, Checkzone now also works in MP!

 

 

 

Hi Vander,

 

Do you happen to have an example of an MP check zone that works? I can't get it to work in MP at all.

 

Also, with spawned or activated planes, I can only get the "Closer" zone type to work in SP; "Further" does not work for me with those planes.

 

Thanks!

 

Jim

Edited by JimTM
Posted

Use Check zone almost exclusively for MP Jim.  

If they can be used instead of Complex Triggers you realize a good savings on CPU use. There is a post about this somewhere.

 

For it to work in MP:

Make sure each Check zone or Check zones have a designated Mission Begin Translator giving it "power".

 

Translator: Mission Begin

    I

Trigger:  Timer

    I

Trigger: Check zone

 

 

Tip

Posted (edited)

Thanks Tip. That's the setup that I used, but no joy.

 

Here's the mission:

 

post-12622-0-93022900-1451957310_thumb.png

 

In this MP mission, I spawn in and hang around outside the zone, waiting for the AI Yak-1 to enter it. An OnPlaneSpawned event from "Yak-1 Air Spawn" (my spawn point) triggers the waypoint, which causes the AI to head toward it. Entry is detected by "Detect Inside Zone", which triggers the subtitle "Plane Inside Zone". When I run the mission and spawn in, the AI Yak does head for the waypoint and enter the zone but I see no subtitle.

 

I confirmed that the timer is set to 5 seconds.

 

"Detect Inside Zone" is set to allies=true (both the AI Yak-1 and the Yak-1 air spawn are Russian and mission countries is set to Russia = allies). The zone is set to cylinder, 3000m, and "Closer"

 

The subtitle is set to all coalitions true, color is red, time is 5 seconds, and the message "Plane inside zone" is there.

 

Not sure what I'm missing.

 

Thanks for any help!

 

Jim

 

P.S. Sorry, I don't know how to make the screenshot larger.

Edited by JimTM
Posted (edited)

~S~ JimTM,

 

The mission is probably running before you spawn in, being only a 5 second delay trigger you're using.

 

You could make that 2 minutes and then see what's what,.. or indeed move the AI spawn further away...

 

Also, you could make a spawn in switch starter instead, using a complex trigger set up.

 

Said set up I used in the last couple of example missions in my thread for easy reference.

 

Good Hunting,

 

!S -Jupp- :salute: 

Edited by Jupp
Posted

Thanks Jupp. I'll try the 2 minutes and your complex trigger suggestion and see if they work. I'm pretty sure that the trigger was ready with the 5-second timer though. When I spawned in, I checked my GUI map and my plane radar confirmed that both the AI and I were well clear of the zone.

 

Cheers!

Posted

~S~ JimTM,

 

Yeah everything you described, should work.

 

There have been a few random "anomalies" reported since 1.106, just keep that in mind too.

 

I'm not sure why your set up isn't working, otherwise, I have been using Check Zones in various ways in the last two missions I posted.

 

It's Always Something,

 

!S -Jupp- :rolleyes:

Posted (edited)

Thanks Tip. That's the setup that I used, but no joy.

 

Here's the mission:

 

attachicon.gifJimTM-MPTestChkZoneTrig4.png

 

In this MP mission, I spawn in and hang around outside the zone, waiting for the AI Yak-1 to enter it. An OnPlaneSpawned event from "Yak-1 Air Spawn" (my spawn point) triggers the waypoint, which causes the AI to head toward it. Entry is detected by "Detect Inside Zone", which triggers the subtitle "Plane Inside Zone". When I run the mission and spawn in, the AI Yak does head for the waypoint and enter the zone but I see no subtitle.

 

I confirmed that the timer is set to 5 seconds.

 

"Detect Inside Zone" is set to allies=true (both the AI Yak-1 and the Yak-1 air spawn are Russian and mission countries is set to Russia = allies). The zone is set to cylinder, 3000m, and "Closer"

 

The subtitle is set to all coalitions true, color is red, time is 5 seconds, and the message "Plane inside zone" is there.

 

Not sure what I'm missing.

 

Thanks for any help!

 

Jim

 

P.S. Sorry, I don't know how to make the screenshot larger.

 

Put a Timer between the "Detect Inside Zone" Trigger: Check zone and the "Plane Inside Zone" Translator: Subtitle in your test mission Jim.

 

You can go direct from a Trigger: Check zone to another Trigger: MCU but not to a Translator: MCU.

At least that is the way I get similar setups with Translator: Subtitles to work.

 

Tip

 

Edit. Here is a simple Check Zone setup I use for Aircraft Spotters in MP.

CheckZone_Group.zip

 

Edited by [DBS]Tx_Tip
  • Upvote 1
Menacing_Ferrets
Posted (edited)

Jim,

 

For a super basic test of a CZ IN try this out.  Just make sure the CZ is set to look for the same coalition as the AF object or it wont trigger. This way you don't have to worry about the AI heading to the waypoint or not, because YOU spawning is what will trigger the CZ.  Yes it will trigger if you spawn within it, not just if you enter from outside. This CZ can be either cylinder or sphere and can be quite small.  Now try spawning at another location,  You won't see subtitle reappear (as long as the duration you set for subtitle has expired at this point) This CZ is still on.  Spawn back in the CZ and see the subtitle appear again.

 

also try making your subtitle a bit bigger, and longer duration so you don't miss it.  A check zone trigger should cause that subtitle to go off without a timer as they are both triggers, but I built the timer in anyway, just for one second separation.

 

post-80326-0-95942100-1452079340_thumb.jpg

 

 

now for my lengthy explanation of Checkzones based on extensive testing and usage and an overall synopsis of this entire thread

 

 

 

 

Legend  Operationally defining....

 

CZ IN is a Closer Check Zone 

CZ OUT is a Further Check Zone

 

I use these terms as they are shorter and thus make the ID tag easier to read (even though I usually have them turned off) Also the dev team mission builders refer to their CZ in this manner

 

 

                                                                                                                                                                                                                                                                                                                                 

Start a QMB mission, record a few seconds of it. Close out of the game. In the editor open the _gen.mission in the track folder you just "created" by your recording.  You'll see check zones used all over the place. Now the QMB is generating a survival flight type mission, forget the actual name off the top of my head, but it's not single player or dogfight. It is generated by the ROF mission generator SO all the check zones are object linked. Completely obsolete now in SP and MP unless you are specifically targeting the Player aircraft in  SP.  You do NOT need to object link Checkzones anymore. (huge huge huge upgrade to these things)

 

You can use check zones to start  AI routines in MP missions centered on all the spawn points, so that if the mission rotates, all those AI routines don't happen on an empty server. (This is just an example, I've since started using onspawned events to do the same thing)  Also I use Check zones to move icons.  Both inside and outside check zones can be seen in generated missions operating as a pair.  Try recording one of the RANKED missions included with the game and you'll see these checkzones as they are currently functioning, without object links.   

 

Turn them on as stated above with an initial trigger, from a variety of things. Events, timers, counters, other checkzones, mission begin translators, waypoints... I am sure I missed something.

 

 Complex triggers should only be used to identify specific models of aircraft or vehicles and then pass an event. Complex Triggers can be activated with a in checkzone so they are not constantly running, and then the CT can easily be deactivated by itself (if tripped), or an outside checkzone.  Checkzones are far less taxing on the server but even with a large number of them active, especially when you set their radii higher will begin to cause noticeable delay.  

 

Now heres the really wild stuff.  They can be de-activated, and re-activated. 

 

One use of this triggering and de-activating, re-activating of checkzones would be and inside/outside checkzone pair that functions as basically a single logic unit.  

 

EXAMPLE

In my runway lights I use such a device so the lights only turn on for friendly AC within a set radius of an AF. Once the AC is within the designated area the lights will turn on based on the CZ IN signal to the RW lights. Checkzone In at this point will just continuously pound the target link with a signal as long as there is an AC inside the radius. (an earlier post described this as a hysteresis loop which was a BEAUTIFUL descriptor). This is of course  redundant because the lights are already on, right? It's not going to make 'em brighter by continuing to hit that RW on trigger. So once the  Checkzone IN is triggered, we want it to turn itself off after it has sent it's initial signal to the RW lights.  Also I have the CZ IN bump the checkzone out starting it looking for the friendly AC to leave the Checkzone Area (flying out of radius, or de-spawning)  it will then use the CZ OUT result to turn off the RW lights. We don't after all need to be giving the NME an easy fix on the AF location. Light discipline right?  

 

The slightly tricky bit was figuring out how to reactivate the checkzones once they've been deactivated.  This is not simply done by bumping it with a trigger, counter, event... like we did initially.  It must first be Activated again, and then bumped with a trigger, counter... etc.   I was excited when I finally figured this out. 

 

This also led me to the understanding that counters and timers can also be de-activated and reactivated opening up a larger array of logic GATES that can be built. But that's another story....

 

After I figured this CZ IN/OUT relationship, I cracked open the Rankedtankadvace MP mission  and was thrilled to see the dev team mission builders using these things in the same way for many things.  One note on an IN/OUT checkzone pair, make the out checkzone a bit larger than the In checkzone radius to prevent the IN CZ being accidentally triggered as a vehicle leaves the CZ out ​radius. I usually go 50m larger for the CZ OUT.  This size difference is also demonstrated in the generated and stock missions 

 

That may have been a bit much to digest, i know, it's not a simple concept to be certain, but once you get it you'll have some much smoother running missions, even with complex triggers because you don't have to leave 'em running.  

 

Complex triggers have an enable check box, that makes it a bit easier to turn on and off, but the CZ are able to be turned on an off too, just a bit more round about..

 

 

 

My stock IN/OUT CZ pair group shown here. These CZ are set to look for Axis AC with 1200 meters coming in, then look for axis AC to leave the area at 1250 meters (or despawn) You of course can customize these checkzone Properties.

 

post-80326-0-86395700-1452069130_thumb.jpg

 

Note the fail safe Kill Both CZs trigger (light blue).   This will completely deactivate both CZ's regardless of which is active.  This of course is not permanent but I did not include an example of reactivation of the pair because if you understand how this works, you'll also understand how to re-start the pair.  Once you understand what this does you should also begin to see how to use this in MANY applications.

 

 

Here is a CZ IN/OUT pair as used in a QMB mission generated by the ROF mission gen. This is a bit harder to "read" but if you look at it long enough it makes sense (even without the ID tags visible)  

 

post-80326-0-52026800-1452069571_thumb.jpg

 

 

Does this help or just confuse further?  There's another cool tool in the Prox Trigger, but that's a different beast, and does require a target link, but target can be any Linked Entity. 

 

 

 

 

 

 

 

 

 

PS if you need a closer look at these pics, use your browser zoom.  It is imperative you see the direction arrows on the target links to understand the logic flow

 

I cannot stress enough how useful it is to look at the dev teams missions to see how they build logic sequences.  REPORTS and EVENTS especially!  If you are unsure of how something works look for it, you'll no doubt find and example, plus will run into stuff you'd never think of.  They build super stable stuff, and in the MP work this is SOOO important.  No one wants to continuously CTD their clients because the it'll emptuy the server and scare people away from it forever ;)

Edited by Menacing_Ferrets
  • Upvote 3
Posted

Thanks for your post MF.

 

There's a couple of points that surprised me:

 

 

 

Checkzone In at this point will just continuously pound the target link with a signal as long as there is an AC inside the radius

 

Are you sure? There are quite a few CZ/counter combos being used that shouldn't work if that were true.

 

 

 

One note on an IN/OUT checkzone pair, make the out checkzone a bit larger than the In radius to prevent the IN CZ being accidentally triggered as a vehicle leaves the CZ out ​radius

 

I think the reason is that you want to avoid the scenario where a plane grazes the CZ IN without entering the CZ OUT. That would leave the CZ IN disabled, the CZ OUT enabled and triggered, but the plane will never cause the CZ OUT to fire because it never entered it in the first place.

 

In general, the trigger system seems to be designed to work on transitions not states, meaning nodes normally do not "continuously fire" other nodes. This paradigm is a bit harder to master, but it potentially saves CPU cycles, since only state changes cause work to happen.

Menacing_Ferrets
Posted (edited)
Checkzone In at this point will just continuously pound the target link with a signal as long as there is an AC inside the radius   Are you sure? There are quite a few CZ/counter combos being used that shouldn't work if that were true.

 

 

Yeah bad choice of wording.  In the case of the runway lights, there is no need to have that CZ In on because every plane that enters it will send that signal to turn on the RW lights which are already on because there is a vehicle inside the CZ already. Will sending that message each time a vehicle enters that CZ slow anything down? Doubtful, but it is redundant in that example.  It's not a constant pinging based on the first vehicle remaining in the CZ itself, but as long as the CZ is on it is listening, all subsequent vehicles entering are what is the redundant part. Just in that example. The constant Listening itself is what can slow down the server. Depending on CZ size and how many are active.

 

If you are counting a number of vehicles entering a CZ to reach a set amount as you mentioned, then yes you NEED to keep that CZ on.  That's a great example of another use of a CZ btw.  Say you want to repair a bridge with a convoy that detects it is destroyed (using an example of yours which I absolutely love) each additional vehicle that enters the "repair the bridge" checkzone can be used to increase the speed the bridge is repaired!!  So if the convoy is intact it rebuilds after X time. If convoy has been thinned out by enemy attack, there is "less man power" available to repair the bridge, and as set up would take longer to repair.  This level of complexity would have very minimal effect on the server. A huge CZ would not be required for said function and once the bridge is repaired and the convoy moves on, that CZ is deactivated. This level of depth  adds so much immersion and has little to no effect on the processor.  Such cool ideas man!! I really love reading your posts! And I love how powerful this tool is!!  

 

Size and number of active CZ's does definitely show on the server graph. For that matter Size of combat areas does too. Those things (combat areas) can be extremely heavy weight when they get bigger.  CZ aren't as bad, but it all about how many linked entities in the long run right? AI and what not being the largest draw.  Anything I can to do keep the server from listening to large areas allows me to add more entities.  

 

As far a the Out being larger, say an aircraft leaves the CZ out, you don't want it to be able to reactivate the IN CZ. if they are similar size it may be possible to trigger the In again on the way out, and because of that one second timer between the IN and OUT the in may Stay on, even though you just left.  This is in keeping with the idea of transitionally triggering.

 

Entering an OUT will cause nothing to happen just an leaving an IN will have no result as well.

 

 IDK, kind of a play it safe deal. Out should ALWAYS be a bit larger when using them in tandem. I can't think of an example of where this wouldn't be true. You Never want to enter the IN and then the OUT would you? The difference in size really only need be the size of the largest vehicle's hit box right? Maybe just a touch bigger.  For instance the RW lights. You can fly outside the IN CZ and the lights'll still be on and will remain so until you leave  the OUTor die or de-spawn, but if you leave the out there should be no way to hit that in with any part of yourself otherwise you leave the lights on, until you fly back in, and then out cleanly.

Edited by Menacing_Ferrets
Menacing_Ferrets
Posted (edited)
What is the difference between two of them?

 

 

The prox switch is object linked to an entity making the entity a moving check zone.  The placement on the prox trigger has no bearing on where the zone is centered, the object linked is the center,   It still needs to be turned on however, just like the CZ.

Edited by Menacing_Ferrets
Posted (edited)
Thanks very much for all the responses folks! I'm still working on the mystery, but perhaps it is an anomaly, as Jupp suggests.

 

So far, I've tried the following:

- Jupp's 2-minute timer after mission start - No luck

- Tx_Tip's timer before the subtitle - No luck

 

One question for Tx_Tip: In your attached group, why do you use 666ms as the value for the delay timers? 

 

I still need to try Jupp's complex trigger suggestion and Menacing Ferret's suggestions.

 

Cheers!

Edited by JimTM
Posted

Jim, could it be a locale problem? If the editor and the game use different locales, maybe the locale used by the game happens to have an empty subtitle? I know I'm grasping at straws there. Maybe replace the subtitle by an "End mission", this way you'll know if there's something wrong with the subtitle itself.

Also, maybe a stupid suggestion, but checked it's allied planes you have checked in in the CZ, not vehicles.

  • Upvote 1
Posted (edited)

I tried Tx_Tip's group (attached earlier) in a mission (attached below) and concluded that the check zone trigger is working in MP but there is some problem with subtitles in MP. I added an FW190 spawn, triggered by the "Detect - In" check zone trigger, and that worked, but the subtitles did not work (one for waypoint being triggered and one for Detect - In). I adapted the mission for SP (replaced air spawn with player plane) and the subtitles worked fine.

 

JimTM-MPTestTxTipGroupTurzovSpotters 2.zip

 

I'll investigate Menacing Ferret's ideas next.

 

Coconut, the locale (Lapino) was OK and I tried your "End Mission" idea by spawning an FW190 instead. Also, the check zone was set to detect axis planes.

 

Thanks!

Edited by JimTM
Posted

....

 
 
 
One question for Tx_Tip: In your attached group, why do you use 666ms as the value for the delay timers? 
 
 

 

Two-fold answer Jim.

 

1) Habit.

So the initial Trigger: Deactivate fires off at .666

I use a .555 Timer for (Spawns, Activates, practically everything within MP missions...etc.) coming off the "In" Check zones then use a separate .666 Timer to deactivate the Check Zone as quick as possible.

 

2) Why. Experience and it works. 

The reason for this is that MP Squadrons that fly in very close formation have and will cause multiple spawns of AAA, tanks, whatever with anything longer. Additionally Players may be in and out of the Check Zone Radius from multiple ingress/egress degrees at the same time.

 

I don't use AI Aircraft within the ME for my MP Missions Jim. That seems to be the constant in the problem you've been having with getting the AI Aircraft to fire off the Check Zone Subtitles. 

Perhaps it is an anomaly. Hopefully everyone can get this figured out.

 

Tip

  • Upvote 1
Posted

~S~ Fellows,

 

To the "rogues gallery" of mission editors on this thread, I salute you all.

 

I absolutely love, this level of co-operation, between our different camps.

 

Realize that people, maybe years from now, will learn through these posts.

 

Most importantly, that everyone in this hobby, has something to contribute.

 

There is, no greater satisfaction, to myself, than, "shooting down troubles".

 

And, in this, "ghost squadron" of ours, in that rarified air, you, are all, Aces!

 

Rock the Casbah,

 

!S -Jupp- :drinks: 

  • Upvote 1
Posted

Rogue you say! I may be a scalawag...scoundrel...ne'er-do-well...rapscallion, but never a rougue!   :)

 

Well said Jupp. There certainly are a good bunch in our mission editing club.

 

S!  :salute:

 

Jim

 

P.S. Slight pause in my mystery bashing while I earn a little money writing.

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