Jump to content

FLAGs, just a nightmare!


vctpil

Recommended Posts

Hi,

 

I definitely don't understand how to use flags. I just want to do something simple by using flags, and this is just not possible!

 

I place a SAM in the middle of a trigger zone. the SAM AI is OFF and become ON when an aircraft fly through the zone. If the aircraft fly outside the zone, the SAM AI came back to OFF.

 

Sound simple. That's does not work with flags., the SAM is still active when the aircraft leave the trigger zone.

 

REPETITIVE ACTION (FA18 inside zone, NO EVENT) > UNIT INSIDE ZONE (Pilot1, SA6 radar ON) > FLAG ON (1)

REPETITIVE ACTION (SA6 AI ON, NO EVENT) > FLAG IS TRUE (1) > UNIT AI ON (SA6)

REPETITIVE ACTION (SA6 AI OFF, NO EVENT) > FLAG IS FALSE (1) > UNIT AI OFF (SA6)

 

What's wrong with that ?

 

Thanks (to help a desperate ME user),

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

You need a fourth trigger setting flag 1 to false when the unit is outside of your trigger zone

In addition, you should actually use a separate larger trigger zone to turn off the AI, or planes that fly in can just turn around and have the SAM turn off, trashing any radar guided missiles.

Awaiting: DCS F-15C

Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files

 

Link to comment
Share on other sites

Thanks for your answer, I will try tomorrow.

 

I already done the scenario without flag, but I would like to insert a time condition to reactivate the SAM.

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

I can't believe we can't give flags a name...

 

It’s probably for compatibility with older missions. I’ve just adapted, and keep a list of the flag’s use on the mission documentation, not a big deal.

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

Triggers in attached.

 

I don't know why, the SAM does not activate when the aircraft is still in the zone and HARM is not present.

 

Any idea ?

 

Thanks.

Image1.thumb.png.c612dad86a6748957ef94a5096efd3ac.png


Edited by vctpil

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

I tried something more simple, still does not work.

 

Is anybody can explain how those :furious::furious::furious: flag logic is working ?

 

Thanks.

Image2.thumb.png.9354846a2535de94c8220bc852653a85.png

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

This one drive me crazy. When the aircraft is outside the zone, the SAM should de-activate, but its is not!

 

HELP!

Image3.thumb.png.5f8b233c9fed32303f4761a1490e832b.png

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

Like said before, no need for so much flags. If you want to add a time condition do:

 

REPETITIVE ACTION > UNIT INSIDE ZONE or HARM in ZONE > UNIT AI ON, Flag 1 true

REPETITIVE ACTION > UNIT OUTSIDE ZONE > UNIT AI OFF, Flag 1 false

REPETITIVE ACTION > time since flag 1 - 30 seconds > do something else

Link to comment
Share on other sites

SAM's may have an activation time, so they will turn on after the trigger. Fly around the SAM and see if it "wakes up" after a minute or two.

Awaiting: DCS F-15C

Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files

 

Link to comment
Share on other sites

Thanks, but this is not working as I want. I have tried flag on, off, true, false, once, repetitive, switched... Still don't understand how the flag are working. :cry: Just don't know what to do.

 

So, let's me explain with more details. Look at the attached screenshot.

 

1. The aircraft is flying without knowing that there is a SAM (Sam inactive)

2. The aircraft enter in the detection range, but the SAM is still inactive

3. The aircraft reach the green zone and the SAM activate

4. if the aircraft turn back and exit the green zone, the SAM de-activate

5. if the aircraft fire an HARM, and the HARM enter the red zone, the SAM de-activate

6. When the HARM disappear (the SAM is immortal for the purpose of test), the SAM activate again. I would like to introduce a time delay at this moment for the SAM not to activate right away.

 

Right now, I don't understant why the SAM is still active when I exit the green zone. Should be simple, but I don't understand. I am on this problem for 3 days already.

 

Thanks for your patience.

Image1.thumb.png.13f68f81a542544c07b391147cb60ba8.png

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

Hi,

 

Thanks to for your help. Here's the mission file in attached.

 

Very simple, the aircraft is flying straight, SAM and aircraft are immortal for test.

 

Waypoint 1 : limit of SAM detection but it will not activate

Waypoint 2 : the SAM activate

 

What is working with flags :

 

1. The aircraft is entering the detection of the SAM but it does not activate

2. The aircraft is entering the green zone, the SAM activate

3. The aircraft is exiting the green zone, the SAM de-activate

 

Now, I set a condition for the HARM without flags :

 

4. If a HARM is entering the red zone, the SAM de-activate

5. When the HARM disappear and the aircraft is in the green zone, the SAM activate

6. If the aircraft is leaving the green zone, the SAM de-activate

 

Til now, everything is working perfectly.

 

The question is : if I want the SAM to activate with a delay after the HARM disappear, I have to use flags, correct ? I am still looking for a solution, and I am going to try your solution :

 

REPETITIVE ACTION > UNIT INSIDE ZONE or HARM in ZONE > UNIT AI ON, Flag 1 true

REPETITIVE ACTION > UNIT OUTSIDE ZONE > UNIT AI OFF, Flag 1 false

REPETITIVE ACTION > time since flag 1 - 30 seconds > do something else

 

Thank you again.

Test.miz

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

I tried simple scenario with HARM and flags, mission in attached.

 

That does not work, the SAM does not activate again when the HARM disappear. Each time I tried with the HARM and flags, something is wrong.

 

I think I don't understand the logic of flags ON/OFF/TRUE/FALSE, because sometimes is ok, sometimes not!

 

Edit : it seems to work when there is 2 possibilities : aircraft "inside zone" and "outside zone", but there is only "missile in zone" and not "missile outside zone". No idea how to solve this problem.

Test 2.miz


Edited by vctpil
more informations

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

hmmm, you can do a check after some time (estimating how long HARM can fly - in my example 60 seconds, change at will):

 

--check if unit inside zone, SAM ON

REPETITIVE ACTION > UNIT INSIDE ZONE > UNIT AI ON

 

--check HARM inside zone, SAM OFF

REPETITIVE ACTION > HARM in ZONE > UNIT AI OFF, Flag 1 true

 

--60 seconds from HARM in zone, check again if unit is inside zone (HARM should be gone by now), if yes then SAM ON (then reset flag 1 to false)

REPETITIVE ACTION > time since flag 1 - 60 seconds AND UNIT INSIDE ZONE > UNIT AI ON, Flag 1 false

 

--unit outside zone, SAM OFF

REPETITIVE ACTION > UNIT OUTSIDE ZONE > UNIT AI OFF

 

Hope it works, like i said, i'm not home at my PC


Edited by dark_wood
Link to comment
Share on other sites

I have done the part of activating the SAM site if a unit is inside a zone, turning it off when it is outside. When you say Repetitive action, do you mean Continuous Trigger?

 

Here is how I remember doing it, altered to what you need because my triggers were looking for a TALD to activate the SAMs instead of turning them off

 

Trigger 1: Switched Condition -> Any of Coalition In Zone (or whatever you would need) -> Set Flag 1 true

 

Trigger 2 : Switched Condition -> All of Coalition out of Zone (or whatever you would need) -> Set Flag 1 false

 

Trigger 3 : Switched Condition -> Flag 1 is true -> Turn On SAM AI

 

Trigger 4 : Switched Condition -> Flag 1 is false -> Turn Off SAM AI

 

 

To add a check for a HARM in the Zone, you modify it like this:

 

Trigger 5 : Switched Condition -> Missile in Green Zone -> Flag 2 true

 

Trigger 6 : Switched Condition -> Time since Flag 2 true > 60 -> Flag 2 false

 

 

Then you add the condition of Flag 2 back into the first Triggers with an AND/OR added where required

 

 

Trigger 1: Switched Condition -> Any of Coalition In Zone (or whatever you would need) AND Flag 2 false -> Set Flag 1 true

 

Trigger 2 : Switched Condition -> All of Coalition out of Zone (or whatever you would need) OR Flag 2 true -> Set Flag 1 false

 

I will doublecheck my mission to confirm but I think this would work

Link to comment
Share on other sites

Hi,

 

Thanks a lot dark_wood, it works. I just add a condition at mission start to set the SAM AI to OFF, otherwise, the SAM activate as soon as I enter its detection range.

 

Purpose :

 

- SAM activate later than normal and de-activate when aircraft escape a zone

- If a AGM-88 is fired, the SAM de-activate

 

In summary :

 

Place 2 trigger zones : SA6 AI ON - SA6 AI OFF

 

MISSION START (SA6 AI OFF) > > UNIT AI OFF (SA6)

REPETITIVE ACTION (FA18 inside zone, NO EVENT) > UNIT INSIDE ZONE (FA18 Pilot, SA6 AI ON) > UNIT AI ON (SA6)

REPETITIVE ACTION (FA18 outside zone, NO EVENT) > UNIT OUTSIDE ZONE (FA18 Pilot, SA6 AI ON) > UNIT AI OFF (SA6)

REPETITIVE ACTION (HARM inside zone, NO EVENT) > MISSILE IN ZONE (AGM-88C, 1, SA6 AI OFF) > UNIT AI OFF (SA6) - FLAG ON (1)

REPETITIVE ACTION (Delay SA6 AI ON, NO EVENT) > TIME SINCE FLAG (1, 10) > UNIT AI ON (SA6) - FLAG OFF (1)

 

That's great, thanks again to everyone.

 

Exorcet : the SAM should re-active after 10 seconds, but it depend if its stay on the same position of if it is try to escape. That help a little for randomization.

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

You don't really need flags to accomplish this... Try it like this:

 

Trigger-SWITCHED CONDITION

Condition-UNIT INSIDE ZONE(FA18Pilot, SA6 Activate Trigger Zone)

Action-UNIT AI ON(SA6)

 

Trigger-SWITCHED CONDITION

Condition-UNIT OUTSIDE ZONE(FA18Pilot, SA6 Activate Trigger Zone)

Action-UNIT AI OFF(SA6)

 

The trigger types all have different characteristics

MISSION START - Execute this trigger Once, at the start of the mission if the CONDITIONS are true

REPETITIVE ACTION- Execute this trigger once every second while the CONDITIONS are true

ONCE - Execute once when CONDITIONS are true and then never check it again.

SWITCHED CONDITION - Execute once each time CONDITIONS are true

Wayz Out

 

 

Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe

HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals

Link to comment
Share on other sites

Guess I should have read to the end of the thread... LOL

Wayz Out

 

 

Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe

HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals

Link to comment
Share on other sites

I have done the part of activating the SAM site if a unit is inside a zone, turning it off when it is outside. When you say Repetitive action, do you mean Continuous Trigger?

 

Here is how I remember doing it, altered to what you need because my triggers were looking for a TALD to activate the SAMs instead of turning them off

 

 

 

 

To add a check for a HARM in the Zone, you modify it like this:

 

 

 

 

Then you add the condition of Flag 2 back into the first Triggers with an AND/OR added where required

 

 

 

 

I will doublecheck my mission to confirm but I think this would work

 

Thanks for this version, sound interesting to understand how flags are working. Just a question, why using switched? Because the use of flag true/false?

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

Hi,

 

I tried to use a randomization event to activate the SA6 after its de-activation due to the HARM as follow :

 

MISSION START (SA6 AI OFF) > > UNIT AI OFF (SA6)

 

REPETITIVE ACTION (FA18 inside zone, NO EVENT) > UNIT INSIDE ZONE (FA18 Pilot, SA6 AI ON) > UNIT AI ON (SA6)

 

REPETITIVE ACTION (FA18 outside zone, NO EVENT) > UNIT OUTSIDE ZONE (FA18 Pilot, SA6 AI ON) > UNIT AI OFF (SA6)

 

REPETITIVE ACTION (HARM inside zone, NO EVENT) > MISSILE IN ZONE (AGM-88C, 1, SA6 AI OFF) > UNIT AI OFF (SA6) - FLAG SET RANDOM VALUE (1, 0, 100)

 

REPETITIVE ACTION (Delay SA6 AI ON, NO EVENT) > FLAG IS LESS (1, 50) > UNIT AI ON (SA6) - FLAG OFF (1)

 

Is someone can explain why that does not work ? I enter the zone, and the SAM does not activate (I did not even fire the HARM).

 

Thanks.


Edited by vctpil

IAMD Ryzen 9 5900X 12x 3.7 to 4.8Ghz - 32Go DDR4 3600Mhz - GeForce RTX 3080 - Samsung Odyssey G7 QLED - AIMXY

Link to comment
Share on other sites

  • Recently Browsing   0 members

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