Jump to content

Count users inside trigger zone? (without scripts)

Recommended Posts

I will probably never learn scripting, it's just too much, and having zero background in coding other than hobbling stuff together in basic and java decades ago, I just can't.


I am trying to find a way to escalate a mission by determining number of units in a trigger zone.


I came across a similar concept Grimes posted lord knows when, by using the Mission Score / Points system, and giving a point to a team when a unit is inside a zone.


This is all fine and well; but it doesn't work in multiplayer.... I don't know why, but I can test it all day in single player, and AI planes trigger the team points no issue. In multiplayer, I'm not sure how I can possibly be doing things wrong, units on blue set to giving blue 1 point when entering a trigger zone.

Blue aircraft in multiplayer flies into zone; no points given.


Set test AI in offline to give blue team 1 points when entering zone; 1 points given when entered.



Can anyone else thing of any other logic system to count the number of ... anything, within a zone?

Link to post
Share on other sites

Can you give more info on what it is youre trying to achieve?

If i need units in zone, i normally put all those units into a group, and then

Group alive less than and Part of group in Zone.

Or Part of group in zone and unit in zone flag increase


If flag value more than..

But unless i know how the mission is going to pan out im stuck on how to achieve the goal.

Link to post
Share on other sites

Issue is different planes can't be in the same group; so I can't use just a single group.


Trying to "count" the number of player aircraft that are in a zone. Which, to determine if a single unit is inside the zone is well and dandy, but I can't come up with a way to allow it to count more than a single user in said zone.


A particular important part is when a player leaves zone, I need the count to decrease.


By using the Mission Goals, it SHOULD work by giving each unit in a zone "1 point" to the team, and have the team points trigger a flag.

And it works... just fine in single player.

But this method appears to be broken in multiplayer.

Link to post
Share on other sites

Long-winded but a switched condtion-

Set flag 1 value 0 at mission start

Flag 1 on part of players group above 50ft.


Unit 1 in zone increase flag 1 value by 10.

Repeat (clone) for each unit.

Unit 1 out of zone decrease flag 1 value by 10.
Repeat (clone) for each unit.

If flag value is more than 100 (youll know you have 10 units in zone) message to all 10 units.

If flag value is more than 290 (youll know you have 29 units in zone) message to all 29 units.

If flag value is 0. (no units in zone) message to all 0 units.

Win game?
As i said, the more the details the more specificity we can help you with.
So the better the 'mission description' the better the solution.

Edited by StevanJ
Link to post
Share on other sites
2 hours ago, XCNuse said:


But this method appears to be broken in multiplayer.


In case you don't find a solution the way you want or as StevanJ proposes, here is a little test .miz I made for another user some times ago.
It uses MIST (loaded at mission start), a little do script that can be easily modified, and two "flag" triggers to make a "timer" to call the script every 20 seconds.
When called, the script makes a table of "blue helos" and display a message to name units that are in zone (if there are).
3 Ai hellos are going in and out of zone - play this mission in F10 map view, accelerate time and see if it approx. matches what you want.
This should work the same in multiplayer.
Instead of calling the function evey 20sec it's possible to call it with a radio item, change units-table, zone name and action of the script pretty quickly.


Link to post
Share on other sites

I guess what I wasn't able to wrap my head around is that I need to have a trigger for EACH aircraft; I can't have a single trigger that does.. all of the aircraft and I guess that's where things were going wrong so I was looking at that mission score as a functional alternative.

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...