Starting a random group from uncontrolled state - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 06-16-2018, 04:07 PM   #1
TheHighwayman
Member
 
Join Date: Oct 2014
Posts: 120
Default Starting a random group from uncontrolled state

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!
TheHighwayman is offline   Reply With Quote
Old 06-16-2018, 10:33 PM   #2
TheHighwayman
Member
 
Join Date: Oct 2014
Posts: 120
Default

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!
TheHighwayman is offline   Reply With Quote
Old 06-19-2018, 03:38 PM   #3
P5138
Junior Member
 
Join Date: Feb 2009
Location: New Jersey, USA
Posts: 65
Default

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

https://wiki.hoggitworld.com/view/DC...oice_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.

Last edited by P5138; 06-19-2018 at 04:00 PM.
P5138 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:27 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.