I recently wanted to create a group of units based on probability; so 50% of the time spawn a group of units at a certain position.
To do this create the group, set the probability of presence of the leader to your desired probability and then for each member of the group set a condition of presence that requires the leader to be present. So,
(alive group_leader);
Job done!
Edit - Added screenshots for clarity:
You can have as many units as you want, in this example I have a player (blue), a group leader (purple civillian in front), and 4 dependent civilians behind. Ordinarily you would have all these units grouped using the group tool (F2) so they work as a team but it is not required.
Units |
Group leader config |
(alive group_leader);making sure that group_leader is the name of the leader that you configured earlier.
Dependent unit config |