I don't know how to do this
because I don't know enough about arrays, but I'm pretty confident that it can be done. It's not particularly a multiplayer issue. The command to make the hostage join a group is, you've guessed it,
join[/i].
NearestObject might come in handy too.
Ah, I've thought of a way.
Create a whole bunch of triggers, one for each Rescue Group. Give them a diameter of say 10m or whatever you like and place them over the hostage. In Groups mode link each Group to one of these triggers, and change the activation box to any group member present. Then in each trigger put:
condition: this and (not joined)
on activation: Johnny join group1; joined=true
In your init.sqs write
joined=false
The variable "joined" is required so that once Johnny has joined one group the other triggers are all effectively switched off.
Check the syntax of the join command, I can never remember the precise details. Obviously you put the name of the group who are linked to that particular trigger.
It's not pretty, but in principle it should work. As soon as a loon from one of the rescue groups comes within a trigger area, Johnny will join that loon's group. Make sure the groups all have space to take a new recruit i.e. no more than 11 members.