DCS World Steam Edition

DCS World Steam Edition

Severus Dec 17, 2021 @ 3:44pm
Editor: random fighter activation
Hello,
i'm still experimenting with the editor. What i'm trying to achieve is a randomized response from AI because i have set up a mission with various assets and i 'm looking for some surprise action. I have a little problem tho.

I have a MIG-29 Squadron with a % to start engine as soon as the mission starts, if not it should have a chance to take off when an enemy aircraft enters a certain area.

I have tryed 2 things:

1) Once/part of coalition in zone/flag set value 0-100
once/flag is more than 50/ai task push (start the engine)

2) Same as before but with RIPEATED ACTION/part of coalition in zone/flag set value 0-100

Now the problem is in the first case it only checks once and as far as i understand it'll never trigger again;
in the second mode on the contrary it'll always start as soon as an aircraft enters trigger zone, i guess it'll do very fast consecutive checks and not even a mere 1% possibility prevents an immediate start.

What i'm looking for is some kind of reaction wich could happen at different times when an aircraft is in trigger zone and, i would like it to happen very often but not for sure.
Is there a way to achieve my objective? Thanks in advance
Last edited by Severus; Dec 17, 2021 @ 3:46pm
< >
Showing 1-6 of 6 comments
Sizigmund Dec 18, 2021 @ 12:14am 
You can try to do the following thing:
If you want the trigger to happen only once, than set it to Once. Now, this trigger have to set some flag. Lets say it will set a flag 100 (not the value of a flag 100 but a flag 100).

Now you need to create an additional trigger and set its condition to a Time after flag and select the flag 100 and a time that have to pass after the flag 100 is set. Lets say 15 seconds. Now in a trigger action you have to set your action flag that your aircrafts are waiting. But I recommend you to set an activation flag for each aircrafts group. So for example when the flag that activates the first group will be set, set an additional flag and create an additional trigger and set it's condition to a Time after flag and in this trigger action set an additional flag to activate the second group and the additional flag for a next Time after flag trigger.

For example, if you have a 4 groups of the enemy planes you need to set the following flags:

Trigger name: Set initial flag.
Trigger condition: Object in zone (the name of your aircraft and a zone that it must enter).
Trigger action: Set flag 100.

Trigger name: Activate the first group and set a flag for a second group activation.
Trigger condition: Time after flag 100, 10 seconds.
Trigger action: Activate group (first enemy group), set flag 101.

Trigger name: Set a flag to activate the third group and activate the second group.
Trigger condition: Time after flag 101, 10 seconds.
Trigger action: Activate group (second group), set flag 102.

Trigger name: Set a flag to activate the fourth group and activate the third group.
Trigger condition: Time after flag 102, 10 seconds.
Trigger action: Activate group (third group), set flag 103.

Trigger name: Activate the fourth group.
Trigger condition: Time after flag 103, 10 seconds.
Trigger action: Activate group (fourth group).

Now, the 10 seconds is to much of course, you can set it to a 2 or 3 seconds. And you have to set the random percent of an activation chance. But the main idea is to have a delay between the activations, so it may help to a random numbers generator to throw a different numbers and as a result the chance of activation will be different, so some groups will activate and some are not.
Last edited by Sizigmund; Dec 18, 2021 @ 12:14am
Severus Dec 18, 2021 @ 4:29am 
Thank you It sounds like a brillant solution. I Guess this chain of consequent flags could be used with a single group like this: the first trigger fail to start the engine, but It sets a new flag, then later It could have a new chance, i'm correct? This way as long i'm in the area a single group May start at differenti times
Sizigmund Dec 18, 2021 @ 5:25am 
If you want it to start the engine later than you have to set the triggers to a Switched condition, so each time you will enter a trigger zone the triggers will activate again, but as long as you remain inside of a trigger zone, the trigger will not reactivate. If you will set them to Once than they will activated only once, the first time you are enter the trigger zone.
Last edited by Sizigmund; Dec 18, 2021 @ 5:27am
Severus Dec 18, 2021 @ 7:14am 
Got It. Thanks again.
I'll try that and i'll also experimet something like:
Switched cond/set flag x and Time After flag (maybe multiple entry)/engine start.
Last edited by Severus; Dec 18, 2021 @ 7:18am
Sizigmund Dec 18, 2021 @ 9:46am 
You may also find a usefull info for your mission implementation in Mission editor manuals. The manuals can be found in your DCS install folder under the Doc folder.
Severus Dec 18, 2021 @ 10:51am 
Yes thanks, i started from the manual, but later you need to be creative 😀. Tonight i'll try the implementation of the solutions discussed here. Thanks again for your help and time
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Dec 17, 2021 @ 3:44pm
Posts: 6