Wednesday 28 August 2013

ARMA 3, probability of presence for group


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 can be configured any way you want, what is required is to have a unique name (make a note of this) and to set a probability of presence (which will set the probability of the whole group spawning).

Group leader config

 Now onto setting up the dependent units. A unit will spawn when the expression in its condition of presence evaluates to true. In this case we want it to evaluate to true when the group leader is present. The syntax for this is
(alive group_leader);
making sure that group_leader is the name of the leader that you configured earlier.
Dependent unit config

2 comments:

  1. Hello please help me, I've been trying to get this to work for about 2 hours this Is simply not working, the leader unit is spawning randomly but the dependant unit with (alive P1); in this condition of presence will never appear. I found somebody else with this problem but with no solution. if you have this working I must be doing something wrong.

    ReplyDelete
  2. Hi,

    I definatly had this working before although that was back at the end of beta.

    I assume the dependant unit spawns properly if you set it's condition of presence to true?

    The other thing I can think of its to make sure that P1 really is the name of the leader unit not the dependant unit.

    I should be able to test this later this afternoon so will let you know what I find.

    ReplyDelete