Sorry friends, just an instructional video for something related to my ArmA unit. If you love my sexy voice, however, you'll love it. It's 6 min of me talking and demonstrating:
-NOTE: This function required CBA to work. If you are running ACE you already have CBA.-
Put this in the group leader's init line:
[this,this,100,2] call CBA_fnc_taskDefend;
the first "this" is "this unit"
the second "this" means "at this location"(meaning based off the location of the group leader). If you are familiar with setpos, then you can Spawn the group anywhere you want, and have them walk to a building specified at this pos and they will travel to it and go in.
the 100 is the radius from the leader's location; meaning if the radius is 100 and you have a group of 12 guys down in the middle of 4 buildings, they will split up between the 4 buildings. If you want them to go into one specific building, for example, you need to place the group near that building and lower the radius to 10-15 so it only covers that building.
the 2 at the end is "building size". The default is 2. You'll have to experiment around with this for bigger/smaller buildings. I don't know exactly the building sizes.
For those of you that understand how functions in ArmA work better than me, here is the official page: