Jump to content

"part of group in moving zone" or something else less specific than "unit"?


Weltensegler

Recommended Posts

Good day gentlemen!

 

I'm currently building a mission making use of the "unit in moving zone" condition.

Inconvenience is that this forces me to make about a 100 triggers so all player slots are covered.

 

Is there a script in any of the libraries (mist, moose etc) that is a bit less specific like "part of coalition in moving zone"?

 

Actually since the vehicle pulling the trigger zone is of the same coalition I guess I would rather need something like "part of coalition that is type aircraft in moving zone".

 

Even "part of group in moving zone" would be a huge reduction in needed triggers already.

 

Thank you for your thoughts in advance!

 

WELD

4790K@4,6Ghz | EVGA Z97 Classified | 32GB @ 2400Mhz | Titan X hydro copper| SSD 850 PRO

____________________________________

Moments in DCS:

--> https://www.youtube.com/user/weltensegLA

-->

 

WELD's cockpit: --> http://forums.eagle.ru/showthread.php?t=92274

Link to comment
Share on other sites

Thank you! I'm going to search deeper into MIST once I'm home.

If you can think of an example mission let me know. Otherwise I gonna figure it out somehow.

Thanks again!

4790K@4,6Ghz | EVGA Z97 Classified | 32GB @ 2400Mhz | Titan X hydro copper| SSD 850 PRO

____________________________________

Moments in DCS:

--> https://www.youtube.com/user/weltensegLA

-->

 

WELD's cockpit: --> http://forums.eagle.ru/showthread.php?t=92274

Link to comment
Share on other sites

Yeah like I said the triggered actions should happen for at least 4 player slots for now.

Being able to make part of a group or aircraft type trigger the moving zone instead of a unit should solve it.

4790K@4,6Ghz | EVGA Z97 Classified | 32GB @ 2400Mhz | Titan X hydro copper| SSD 850 PRO

____________________________________

Moments in DCS:

--> https://www.youtube.com/user/weltensegLA

-->

 

WELD's cockpit: --> http://forums.eagle.ru/showthread.php?t=92274

Link to comment
Share on other sites

Yeah like I said the triggered actions should happen for at least 4 player slots for now.

Being able to make part of a group or aircraft type trigger the moving zone instead of a unit should solve it.

 

Alright. I am not 100% sure this would work online but it does offline so here goes:

- create your player slots and name the units 'player1', 'player2', 'player3', 'player4'. Say they are blue coalition

- create the moving zone around, let's say unit 'redzoneunit' (also, create the unit, obviously)

- load MIST in the beginning of the mission

 

create a script file or simply do a do script trigger with this and load it after MIST :

do
mist.flagFunc.units_in_moving_zones{ units = {'player1','player2','player3','player4'}, zone_units = {'redzoneunit'}, flag = 101, radius = 6500 }
end

what that means is that a process will start checking every second if any of the players are within 6500 m (or feet) area around redzoneunit. If that happens then flag 101 is set true and stays like that.

 

If you want to refine your function (say you want to unload it from memory if flag is true) then:

do
mist.flagFunc.units_in_moving_zones{ units = {'player1','player2','player3','player4'}, zone_units = {'redzoneunit'}, flag = 101, radius = 6500, stopflag = 101 }
end

 

If you need this function to fire at bigger intervals then add interval = 60 in the parameters list and it will fire every minute.

 

Check MIST documentation, it is very handy. I find myself using these flag functions very often.

[sIGPIC]OK[/sIGPIC]

Link to comment
Share on other sites

Thank you so much for taking the time! I will give this a shot now.

If it should not work in my case I will illustrate and show you exactly what I'm doing.

 

I mainly kept short on the explanation at first to keep the question compact for readability.

I'll keep you posted! Thanks a lot!

 

WELD

4790K@4,6Ghz | EVGA Z97 Classified | 32GB @ 2400Mhz | Titan X hydro copper| SSD 850 PRO

____________________________________

Moments in DCS:

--> https://www.youtube.com/user/weltensegLA

-->

 

WELD's cockpit: --> http://forums.eagle.ru/showthread.php?t=92274

Link to comment
Share on other sites

Worked perfectly! Thank you so much!

Took me an hour at first but the problem turned out to be something else.

I had MIST loaded once,on mission start, time>1, do script file - loadM IST ...which loaded fine the night before and I could call mist commands.

Last night it didn't work/load mist anymore until I set that trigger from "on mission start" to "no event".

No idea why that is a problem now and wasn't before but all works great now.

 

Thank you for your help @Zayets!

 

WELD

4790K@4,6Ghz | EVGA Z97 Classified | 32GB @ 2400Mhz | Titan X hydro copper| SSD 850 PRO

____________________________________

Moments in DCS:

--> https://www.youtube.com/user/weltensegLA

-->

 

WELD's cockpit: --> http://forums.eagle.ru/showthread.php?t=92274

Link to comment
Share on other sites

Zayets,

 

I tried the MIST function and it looks like I am doing something wrong and the PDF is not helping. According to the guide, my flag should be stopped at every interval (in this case 2sec). Am I correct? If so, shouldn't I get a message "testing" every 2sec as welll (assuming there is one of the "player" in the zone at that time ??!

groug_moving_zone.miz

My systems:

 

Windows 10 64 bits

I7-8700k

32.0 GB RAM

500Gb SSD

Asus ROG 2080ti

HP Reverb

 

Windows 10 64 bits

I7-6820HQ CPU @ 2.70Ghz

32.0 GB RAM

500Gb SSD

Nvidia Quadro M4000M

TrackIR 5

Link to comment
Share on other sites

Yes, you don't need to put the script in a continuous trigger. Once should suffice as once this is called the function is scheduled by itself. If make it continuous the it will be called every second.

- put your script in a ONCE trigger (give time more 5 so that you can be sure MIST is loaded)

- add a continuous/switched trigger to print your message.

If you ask me, the interval can be a lot bigger as the radius is pretty big and units will not leave that particular zone (2500) in 2 seconds. Also, make sure the units do enter in the zone around redunit. Distance measured is almost 5000 ft on the mission you sent me.

[sIGPIC]OK[/sIGPIC]

Link to comment
Share on other sites

Yes, you don't need to put the script in a continuous trigger. Once should suffice as once this is called the function is scheduled by itself. If make it continuous the it will be called every second.

- put your script in a ONCE trigger (give time more 5 so that you can be sure MIST is loaded)

- add a continuous/switched trigger to print your message.

If you ask me, the interval can be a lot bigger as the radius is pretty big and units will not leave that particular zone (2500) in 2 seconds. Also, make sure the units do enter in the zone around redunit. Distance measured is almost 5000 ft on the mission you sent me.

 

Thanks for the help. I actually had such script earlier and it could not work...and still doesn't. Well, I get the first "testing" message when the first AI gets in the zone but that message never comes back afterward even if the 3 AI definitely leave and come back into the zone (on their return).

 

Is the problem in the script or in the way to handle the message trigger?!?

groug_moving_zone.miz


Edited by strikers_blade

My systems:

 

Windows 10 64 bits

I7-8700k

32.0 GB RAM

500Gb SSD

Asus ROG 2080ti

HP Reverb

 

Windows 10 64 bits

I7-6820HQ CPU @ 2.70Ghz

32.0 GB RAM

500Gb SSD

Nvidia Quadro M4000M

TrackIR 5

Link to comment
Share on other sites

This is actually normal. Your function is this :

 

do
mist.flagFunc.units_in_moving_zones{ 
units = {'player1','player2','player3'}, 
zone_units = {'redzoneunit'}, 
flag = 101, 
radius = 2500, 
interval = 2,
stopflag = 101 }
end

 

What that means is that function is fired every 2 seconds and if any of the units player1, player2,player3 are to be found within 2500 feet from redzoneunit then flag 101 is set to TRUE. Furthermore, function is unloaded from the memory because flag 101 was set to TRUE (see stopflag)

Your message is put in a switched condition which is evaluated every second based on flag 101. If this is false then trigger is still valid, once this is true the trigger gets unloaded.

Add that trigger in a continuous one as flag is always true from this point on. To make flag 101 false once units get out of zone you need to include parameter toggle=true in the function call.

[sIGPIC]OK[/sIGPIC]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...