Jump to content

Can I put certain assets to appear based on probabilities?


Recommended Posts

Posted

I was wondering if it is possible to place an enemy fighter departure (let's say 4 MiG-29s) 40 minutes after I takeoff (or start hitting some assets in the area) with a probability of 30%. Is the similar thing can be applied to enemy SAM sites? Or any other asset in general.

 

 

Maybe even more advanced than that, there would be a Gaussian distribution around some time, for an enemy to appear. Let's say that it is expected to appear around 13:00, but it can appear at 12:30 with a probability of 10%, at 12:35 this is 13%, and this probability becomes 90% when it is 13:30.

 

 

This would add much more excitement to the missions.

[CENTER]

Signum_Signatur.png

[/CENTER]

Posted

Absolutely.

 

You can either use the SET FLAG RANDOM VALUE trigger, or the RANDOM trigger. The second requires a little more explanation, but the first is very simple-

 

1 ONCE (flag value, NO EVENT)

 

(no conditions)

 

SET FLAG RANDOM VALUE (1, 1, 3)

 

======

 

1 ONCE (Spawn enemy, NO EVENT)

 

TIME MORE (2400)

FLAG EQUALS (1, 3)

 

GROUP ACTIVATE (MiG29)

Posted

What I do:

 

 

Mission Start Trigger > Flag 1 set random value between 1-100

 

 

Once Trigger > Time more 40 minutes, if Flag less than 31 > Launch 4 MiG's

 

 

 

 

If I want to make the takeoff time random I'll either use the OR condition between blocks of "Time more" and the Flag values. An alternative is to use the Random trigger with very low values:

 

 

Once Trigger > Time more 40 minutes, Random 1% > Launch 4 MiG's

 

 

This trigger means that every second over 40 minutes there is a 1% chance of a MiG launch. It's good when you want the random event to happen with a window of minutes (for example at 3 minutes, the probability of the spawn having happened is about 85%) but if you want a span of 10's of minutes or hours, you'll need to break it up into multiple triggers maybe with slightly larger probability:

 

 

 

 

Once Trigger > Time more 40 minutes, Time less 41 minutes Random 2% > Launch 4 MiG's

 

 

Once Trigger > Time more 45 minutes, Time less 46 minutes Random 2% > Launch 4 MiG's

 

 

Once Trigger > Time more 50 minutes, Time less 51 minutes Random 2% > Launch 4 MiG's

 

 

etc

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

 

  • Recently Browsing   0 members

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