Jump to content

mission editor-possible to avoid AI to engage in a trigger zone?


9.JG27 DavidRed

Recommended Posts

hello guys, as im slowly making progress with an online mission im building, i seem to become a bit more familiar with triggered actions...

 

however,while im building my mission, i get more and more ideas of what to implement, and i also run into more problems...

right now, i would like to have a zone,area around an airfield, where enemy AI will not engage...i dont want that people on my server are strafed by AI flight groups while just starting up the plane, or on final approach...

the problem,...im not yet able to avoid the AI doing exactly that...

i found a trigger called something like unit AI off, which seems to do exactly what i want, but only for ground units...as soon as i want to to use it for a flight group, this action doesnt seem to work anymore...

 

though i assume, that this still can be done...

so thx in advance for any answers and tips!

Link to comment
Share on other sites

Set AI task in The advanced waypoint options as "hold fire" and the set the task in triggered actions when unit / group in zone. When you go to set AI task it shows available tasks. Choose the hold fire one.

 

This answer is a bit short but I'm on my phone. If someone else doesn't elabourate then I will when I get to a keyboard.


Edited by ENO

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Okay... a bit more detailed response.

 

First- go into the triggered actions icon next to the weapons loadout button.

 

When you're there, click new. Option. ROE. Weapon hold.

 

Call it "Weapon Hold."

 

You also need to create one for "weapons free"

 

Then go into trigger system. New Switched condition / red unit 1 in zone (airbase) / AI task set "weapon hold."

 

The only issue I can see with that is that my understanding is that while the trigger system is okay at turning things on- it doesn't automatically turn them off so we may need to set this up with a flag.

 

So the way around that would be:

 

Continuous / unit 1 in zone / set flag on (1)

Continuous / unit 1 out of zone / set flag off (1)

 

Continuous / unit 2 in zone / set flag on (2)

Continuous / unit 2 out of zone / set flag off (2)

 

etc...

 

What that does is turn the flag on when enemy aircraft are in the airbase zone and turn it off when they're out. I was thinking you could save time with just a "coalition in zone" but that wouldn't allow you to weapon hold specifically on the aircraft that was in the zone.

 

Then you can go

Continuous / flag (1) true / Ai Task Set: Weapon Hold.

Continuous / flag (1) false / Ai task set: Weapons Free.

 

And do that for subsequent red units.

 

Just to clarify- that's how I would set it up or at least try to. Perhaps there is something I haven't thought of- please correct so that I can learn too. I'm still pretty new at it.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

thx very much eno!

i will give it a try tomorrow and report back again!

the only thing where i probably will run into trouble is the flag option...firstly, i dont have a clue what they are supposed to do, and secondly i dont know where to find them...but anyway, tomorrow when im home again, i will give it a try and tell you how it worked out!

thx again mate!

Link to comment
Share on other sites

When you set a triggered action as "flag on" it will give you a chance to give it a number. There are a variety of numbering systems but most are just user preference and completely up to you.

 

So let's say we want to set a point in the game (literally a markpoint) when a unit enters one of your defined zones. Okay- so now you have a "unit in zone" but you want to be able to give that unit a couple of minutes before they start getting shot at.

 

How can you do that? There's no "time since unit entered zone" trigger condition- so what you can do instead is turn a flag on. Let's say flag 10 (option is there when you put "flag on."

 

So now what this means is that "flag 10" will be "true" (on) whenever that unit has entered the zone.

 

So now if you look at your trigger conditions options you'll find one that says "Time since flag." You wanted to have your forces engage the enemy 2 minutes after they entered the zone.

 

Now you can go "once / time since flag (10) = 120 seconds / group activate

 

This will activate the group you wanted to engage the enemy unit.

 

This description is specific to describe a flag- there are other things to consider if you're going to late activate a unit that is in the map, like checking "late activation" and if you want the unit visible even when inactive you need to check "visible before start."

 

That's another story- but as for flags... they are instrumental!

 

Try this when you get home:

 

Put an aircraft of any description in the mission editor. Set a waypoint wherever you want.

 

Make a zone big enough that the plane can fly through it almost instantly (so you don't have to wait around)

 

Go into triggers- make

 

once / unit in zone (choose the aircraft and zone you just made) / flag on (1)

 

once / time since flag (1) = 30 seconds / explode unit

 

What will happen when you select "fly mission" is an AI aircraft will fly into the zone and cause flag 1 to be true. The next trigger then tells the game to wait 30 seconds from the time flag 1 is found to be on (true) and then will blow up the aircraft.

 

It's just an exercise... but then let's say you want to build on that.

 

Let's say that you want to build some activity following that event- but you want some delay...

 

You could go:

 

once / unit dead (choose aircraft unit) / flag on (2)

 

once / time since flag (2) = 10 seconds / message to coalition (blue)= flags are awesome.

 

 

The only issue with flags that you need to remember is they don't automatically turn themselves off or become "false." That aircraft above, for example... once it is blown up- it is technically out of the zone... right? So when unit is "out of zone" that flag (1) should be set to false-

 

But it isn't.

 

So as you're using flags you need to remember that you need to set the false conditions yourself. If a unit is in your zone and then leaves- that flag will stay true until you turn it off yourself with a condition opposite of that which had it turned on in the first place.

 

Flags can also be given a set value, can increase and decrease in value and can be given random values that you can use to generate random events.

 

For example, let's say that for every time a unit enters a zone a certain flag value is added. You choose the flag's initial value (flag 3 value is 1) and then as a triggered action it increases value by 1 each time a unit enters a zone.

 

You could then set it up so that when flag 3 has a value of 10 (9 units have entered the zone) that you perform an action (or set yet another flag for use later on.)

 

Further, generating "random value" for a flag (between 0-100 for example) allows you to go into your trigger conditions and find "flag value more" / "Flag value less." Let's say flag 3 is at a random value between 0-100. You do this by:

 

once / set flag (3) random value = 0-100 (this is available in a menu below when you choose the random value in conditions).

 

Then you can figure out what you want to do with it.

 

once / flag (3) is more 50 / activate unit A

once / flag (3) is Less 50 / activate unit B

once / flag (3) equals 50 / activate unit C

 

You could send up any number of random actions using "flag is more / flag is less" triggers to establish actions based on the randomly generated value.

 

Make ANY sense or am I muddling the issue?


Edited by ENO

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

  • 6 years later...
  • Recently Browsing   0 members

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