Jump to content
Sign in to follow this  
Alfaunostebas11

Defend area target

Recommended Posts

Posted (edited)

Dear friends, good morning !
I am still asking you a question, concerning the construction of the missions and in particular the realization of a mission objective.
The player's job into his plane is to defend ground units (stationary vehicles and artillery) that are attacked by the enemy. The goal will be achieved if - after a certain period of time - at least a number of units manage to survive.
I remember that in IL-2 Sturmovik original it was very simple: there was a target, called Defend Area, in which it was simply necessary to indicate the percentage of units that had to be saved.
In this case I would need an MCUS that could count how many units are still alive in a certain group or in a certain area, but the thing seems to me not so simple.
If it were airplanes in flight or moving vehicles I could use the Complex Trigger, but this does not seem to work with stationary objects, as the related options in the Events Filter section, such as, for example, Object Stationary and Alive, seem not to work or not be implemented.
So, also in accordance with what is said in the Manual about TCT, "If you want to detect objects that are already inside or outside a zone (in addition to detecting objects entering or leaving a zone), use the check zone trigger"
Therefore I used the Check Zone trigger with object links to the units to be detected. The problem is that this trigger, unlike the TCT, does not fire for each object, but makes only one detection, so my solution was to insert as many Check Zones as there are objects in the area.
This solution seems to work, but it has the problem of weighing down the mission layout , because, for example, if there are thirty objects to monitor, I need thirty Check Zones and as many Timer delays which are then all linked to a counter.
Basically and more generally, the problem is: how to count the number of (stationary) objects present in a specific area and at a specific time.
I believe that you, friends, will probably have better ideas than mine ...
Thanks for your attention, Stebas

PS. I attach a simple flow chart, showing my solution, referring, as an example, to only three objects to be detected

 

 

 

 

Defend area flow chart_01(1).jpg

Edited by Alfaunostebas11

Share this post


Link to post
Share on other sites
Posted (edited)

You can use on-killed events to count units destroyed. Lets say you have four arty pieces and the goal is to keep the losses at 50% or less. Using counters set to 1, tie one to each unit. Have all four counters then activate a counter set to 3. Once that counter reaches 3 the mission will have failed. The reason for separate counters for each unit is that some units will produce more than 1 on-killed event which messes up the count. Once the counter reached 3 you can use it to trigger a message. Here is an example for counting destroyed vehicles in a convoy:

image.thumb.png.1522e0eb08dfb37fc8a52f24aafd5c61.png

Edited by No_85_Gramps

Share this post


Link to post
Share on other sites

Thanks Gramps.
Yes, I know this method and have also used it in other circumstances.

But now what I would is a different result.
I don't want to activate a failed goal, but I want achieve a positive goal.

I want to see, after a certain period of time, the green label on the map that says "secondary protect area completed" and not simply wait for the the lack of the "secondary objective failed" red label.

And in the final screen I want to see: Mission accomplished, primary obiective (land) and secondary 1 objective completed.
Perhaps, for most people, it maybe a small and useless difference, but I wanted to understand if and how it can be achieved ... with an easier way than I have experienced with multiple Check Zones ...

Thank, Stebas.

 

Share this post


Link to post
Share on other sites

Could you just use a timer set for the length of time needed for mission success, and when the time is up generate the mission success message? Unless of course the mission failed due to x number of units being killed. I don't think it's a small and useless difference at all. 

Share this post


Link to post
Share on other sites

OK Gramps.
I will try the solution I have adopted with the Check Zones, but if it proves too heavy, I will certainly use the count of the destroyed units instead of the surviving ones, the failure of the objective, rather than its achievement.
In practice, nothing changes, and the final result of the mission is not affected ...
Thanks for your attention.

Share this post


Link to post
Share on other sites

You're welcome. Don't think I quite got it figured out. I'm a rookie with the ME, maybe one of the more experienced mission builders will respond.

Share this post


Link to post
Share on other sites

Here I learned that even the most experienced often do not have the ready solution ... and in any case every problem can have different solutions and all of them can be effective.
This is a very beautiful thing !!!

Regards, Stebas.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

PLOT TWIST !

I had TESTED the "target defend area" mission with the use of Check Zone triggers, as indicated in the flow chart above and it worked fine.
But now, when I go to use that in a mission, it doesn't work anymore ...!
It seems that the Check zone detects stationary units object-linked by it, even if they are destroyed ... Is it possible?
I explain better.
If I object link Check Zone trigger to a specific stationary enabled vehicle or artillery (not setting plane or vehicles coalitions as true in the Advanced Properties), the Check Zone itself, when activated during mission, detect the unit and fires ...
But if fires also after the unit is destroyed, during the mission!
How is it possible that it detects a destroyed object?

I specify that, of course, the Check Zone is activated after the object to be detected has been destroyed and that the object is in the range of CZ...

 

Edited by Alfaunostebas11

Share this post


Link to post
Share on other sites

There is (or at least was) a known issue with Check Zone MCUs sometimes not functioning correctly within a player-hosted Dogfight game. They work just fine in Single Player, DServer hosted Dogfight and Player/DServer hosted Cooperative.

 

I haven't kept an eye on this issue lately, so I'm making an assumption that it hasn't been fixed yet. If it has, then just ignore this post.

 

I'm also not sure why you are Object Linking the Check Zones directly to anything. You would generally only need one CZ for each group (two if you wish to detect objects in and out), not one for each object within the group. Give me a nudge if you wish, though I don't get to browse the forums as often as I used to.

Share this post


Link to post
Share on other sites

Excuse please,

 

You want to know if at least a certain units are alive after a certain time?

 

You start with X units and after a certain time T you need at least Y units alive to be successfully defended.  Attackers kill Y + 1 to win.

 

No need for Complex triggers to determine winner.

 

Each ground unit is tied to a counter. When it hits Y + 1   Counter hits subtitle " Attackers win".  Same counter hits a Deactivate. Deactivate goes to timer T. Timer T is tied to subtitle "Defenders win". If attackers do not Kill Y + 1 then timer goes off and defenders win.  These two outcomes can be tied to secondary goal MCUs.

 

 

  • Thanks 1
  • Upvote 1

Share this post


Link to post
Share on other sites

That would basically be my solution, or a variation of it. In any case utilizing timers and event reports.

 

Timers solve a lot of problems.

Share this post


Link to post
Share on other sites

I'd solve it the same way, but I'm not opposed to someone figuring out a different way.

 

Having said that, in my opinion, @Alfaunostebas11's solution is just overly complex, and checking X targets over Y time is just easier.

Share this post


Link to post
Share on other sites

Aye - and I meant to say “counters” solve a lot of problems. Timers are just an of course.

Share this post


Link to post
Share on other sites
17 hours ago, JG1_Butzzell said:

Each ground unit is tied to a counter. When it hits Y + 1   Counter hits subtitle " Attackers win".  Same counter hits a Deactivate. Deactivate goes to timer T. Timer T is tied to subtitle "Defenders win". If attackers do not Kill Y + 1 then timer goes off and defenders win.  These two outcomes can be tied to secondary goal MCUs.

 

Thank Butzzell !
I have tested your solution and it works!
That was exactly what I was trying to accomplish, but I couldn't, basically because - who knows why ... - I never imagined that the Deactive could be used with the Timer, blocking the path! Beautiful idea ...
Then I had looked for other more complicated roads, but then I also ran into the Check Zone problem that cannot recognize the unit alive from the destroyed ones ...
Below I attach what is the flow chart that I used, using the Damage MCU to immediately destroy the number of units needed to test the mission.

40032098_Defendareaflowchart_00.thumb.jpg.c39ddaf4d99c5669f8ca58c8dc14b8a4.jpg

As I said, the key point, the joint of all is the timer X, which works like a traffic light ...😀😀😀

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
Sign in to follow this  

×
×
  • Create New...