Jump to content

Starting a random group from uncontrolled state


TheHighwayman

Recommended Posts

I have spent quite a bit of time studying what is already written in the forums regarding randomization, and either I do not understand it very well, or I am missing something, or both.

 

The mission is this:

 

F18 (Player) must depart Groom Lake to defend against a SEAD attack on one of three possible targets (North, East, or South Targets).

 

I want the choice of attack to be random so the player does not know which direction to fly until the attack is formed and inbound from Nellis.

 

At Nellis, the Blue force begins with all aircraft uncontrolled.

 

I can start the aircraft just fine (AI Task Push, then set up start for each group under Triggered Actions). No problem.

 

What I cannot do is make sense of how to get the AI to randomly select a target.

 

I have set up three groups for SEAD mission.

 

I then tried to set a random trigger so that just one of the three groups will start. So far, my result were: no groups start; only the first group starts; all groups start. I cannot get just ONE group to start.

 

I have read the forums, but I cannot make sense of how to set the triggers properly. I have tried several permutations of them. I quite need a simple explanation of the most efficient way to randomize between three options or groups.

 

Thank you for your time!

Link to comment
Share on other sites

I seem to have figured it out.

 

This post by Mad Tommy had what appears to be a workable solution:

 

There is a pretty simple and robust way to do this. I use it on almost all my missions.

 

Mission Start > Random 50% > Set Flag 1

Mission Start > Random 50% > Set Flag 2

Once > Flag 1 True & Flag 2 True > Set Flag 3

Once > Flag 1 False & Flag 2 True > Set Flag 4

Once > Flag 1 True & Flag 2 False > Set Flag 5

Once > Flag 1 False & Flag 2 False > Set Flag 6

Once > Flag 3 True > Activate Groups 1

Once > Flag 4 True > Activate Groups 2

Once > Flag 5 True > Activate Groups 3

Once > Flag 6 True > Activate Groups 4

Flag 3 - 6 all have a 25% chance of being active, only one can become active.

 

What is missing from his post is you need to turn ON "Late Activation." (Put a check in the box.)

 

Also, the groups that do not activate will not appear as uncontrolled units. That may be important to you or not, if you want to have the inactivated units sitting on the tarmac for some reason. I would bet that too could be figured out, but it is beyond the scope of my present goal.

 

Anyway, I worked it out.

 

Mad props to Mad Tommy, even though the guy appears to be banned. :-( +1 to you anyway!

Link to comment
Share on other sites

There is an even simpler method described in the Hoggit wiki:

 

https://wiki.hoggitworld.com/view/DCS_editor_Randomization#Single_Choice_from_List

 

I came across a similar problem while doing the selection on a much larger scale (one of 20 groups). My first solution was a confusing jumble of conditionals that was cumbersome to add to. This is more direct and does the required task just as well (while being easily scalable).

 

The only issues I've had with it are that in a long list there is a tendency for the ones closer to the beginning of the list to get chosen more often. I just tweak the randomness until it feels fair. This method also means there might need to be flags added if you want to know and use the information of exactly which option you got.


Edited by P5138
Link to comment
Share on other sites

  • Recently Browsing   0 members

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