Jump to content

FLAGs, just a nightmare!


vctpil

Recommended Posts

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 (SA6 random, NO EVENT) > > FLAG SET RANDOM VALUE (1, 0, 100)

 

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

 

With that, the SA6 still always activate as soon as the HARM is destroyed. :cry:

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

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 (SA6 random, NO EVENT) > FLAG IS TRUE (1) > FLAG SET RANDOM VALUE (1, 0, 100)

 

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

 

With the addition in red, the SA6 does not appear at all (no HARM fires). First appearance only concern the first two lines, so the SA6 must appears.

 

Really don't understand. What kind of logic have FLAGs ?


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

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?

 

If you use continuous /repetitive tiggers, you are doing the action constantly. I've found that it messes with the AI when you repeatedly give the same command. It might be causing issues with the SAM to activate because it takes a few seconds to deploy. Hitting the same command to turn on could restart the deployment

 

Using switched conditions you turn the process into a State Machine. The process only makes a change like turning on/off the SAM when the condition is met.

 

Also having specific conditions trigger a flag and then using flags to activate the Units to do something allows you a lot of flexibility.

 

Lets say you want the SAM active when there is a Blue player in Zone A, but there must also not be a HARM in Zone B, or when a TALD is in Zone A, but always be on when a nearby EWR is killed.

Then you have a trigger for each thing that should turn the SAM on, plus an opposite trigger to turn it off.

 

Then combine all the flag states at the end like my example

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

 

This one is not working as I want, when the aircraft is entering the SAM detection zone, the SAM activate. I want it activate only when entering the green zone (smaller zone than the detection zone).

 

For anything I tried, entering or exiting the zone and the SAM activate or not is working perfectly. When you introduce the HARM, everything stop working properly.

 

Question : on your trigger 2, flag 1 OFF, is there a difference for the flag 1 to true or false ? In my logic, when the flag 1 off, it can't be true or false.


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

Let's take another example :

 

The aircraft is flying toward the SAM, cross the detection zone (SAM de-activate), cross the green zone (SAM activate)

 

Switched Condition > FA18 inside green zone > Flag 1 On

Switched Condition > FA18 outside green zone > Flag 2 On

Switched Condition > Flag 1 is true > SAM AI On

Switched Condition > Flag 2 is true > SAM AI Off

 

When the FA18 cross the detection zone, the SAM activate ?!? According to the second trigger, it should not, the FA18 is still outside the green zone.

 

How can it be possible ?!?

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

Why do you insist on using flags? Just push the AI state or ROE directly when the conditions are met.

 

You are never setting the flags back to false, so they only work once. You must reset the flag values upon activating the condition if you want to use them more than once. I.E. AI ON and FLAG 1 OFF, AI OFF and FLAG 2 OFF.

Link to comment
Share on other sites

"Why do you insist on using flags?" Because I cannot use a random condition without flag, as far as I know.

 

Switched Condition > FA18 inside green zone > Flag 1 On

Switched Condition > FA18 outside green zone > Flag 2 On

Switched Condition > Flag 1 is true > SAM AI On - FLAG 1 OFF

Switched Condition > Flag 2 is true > SAM AI Off - FLAG 2 OFF

 

Like that ? Still not working, the SAM still activate toot early.


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

This is what I am trying to do : https://forums.eagle.ru/showpost.php?p=4242610&postcount=13

 

Instead of the time delay, I would like to randomize the SAM activation.

 

There is different possibility from 1 to 4, with or without flag. At the moment I try to insert the point 5, nothing is working correctly.

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

It was at this point some years back I decided scripting was easier, and I'm still happy with the investment! Looking at posts like this with triggers and flags makes my head hurt!

I still use TIME SINCE FLAG occasionally though and you can add that into some of your conditions to set delays.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Here's the last .miz in attached.

 

If you test it, everything is working fine, unless that if you fire the HARM and it is destroyed, the SAM will not re-activate again.

 

If someone can have a look, please.

 

Thank you.

Test 2.miz


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

Hi,

 

Wow, that's amazing, the way you are trying to solve the problem.

 

The thing is the SAM detect the aircraft when entering its detection zone, not from the green zone. The first idea is to delay the activation of the SAM.

 

This part is working with what I did. I am going to try with the missile only to see if this part is working correctly.

 

Thanks a lot.

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 this one, just to concentrate on THE problem (no more green zone to de-activate/activate the SAM) :

 

SWITCHED CONDITION (AGM88 inside zone) > MISSILE IN ZONE (AGM-88, 1, Red zone) > UNIT AI OFF (SA6)

 

1. The SAM activate when the aircraft is entering its detection zone (the yellow circle)

2. I fire a HARM and the SAM de-activate when the missile is entering the red zone

3. When the missile is destroyed, the SAM DOES NOT RE-ACTIVATE

 

I don't understand why the SAM does not re-activate because the conditions are filled.

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

Now this one :

 

SWITCHED CONDITION (AGM88 inside zone) > MISSILE IN ZONE (AGM-88, 1, Red zone) > UNIT AI OFF (SA6) - FLAG ON (1)

SWITCHED CONDITION (AGM88 outside zone) > TIME SINCE FLAG (1, 15) > UNIT AI ON (SA6) - FLAG OFF (1)

 

1. The SAM activate when the aircraft is entering its detection zone (the yellow circle)

2. I fire a HARM and the SAM de-activate when the missile is entering the red zone

3. The SAM re-activate 15 seconds after the HARM has enter the red zone

 

Playing with the timing and the size of the trigger zone are apparently the only solutions to de-activate/activate the SAM, because there is no MISSILE OUTSIDE ZONE option.


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

Thanks for your file and suggestion, and I will try your very interesting version.

 

In the mean time, I have "finish" this version in attached, late activation of the SAM, and random re-activation after a HARM is fired to the SAM but not destroy it.

 

Thanks to all.

 

I need some vacation now! :lol::lol::lol:

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

  • Recently Browsing   0 members

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