Yeh, K, what U need to make is a trigger, and write down the condition as U want, then in activation put in this:
[*person to join*] join *leader of group to join*
Eg.
[man1] join player
will make man1 join the group which has the player as the leader