OK, everything is working OK, but the new units aren't always replacing the old ones.
Here's the script for the West Infantry respawn:
#InfantryW
? (name leader _grp == format ["%1",_name]) : goto "skipofficerW"
"OfficerW" createUnit [_pos,_grp,"this addmagazine ""berettamag"";this addmagazine ""berettamag"";this addweapon ""beretta"";_name=this",0.6,"lieutenant"]
#SkipOfficerW
"SoldierWB" createUnit [_pos,_grp,"this addweapon ""binocular""",0.5,"sergeant"]
"SoldierWMG" createUnit [_pos,_grp,"",0.4,"sergeant"]
"SoldierWLAW" createUnit [_pos,_grp,"",0.4,"corporal"]
"SoldierWB" createUnit [_pos,_grp,"",0.4,"corporal"]
"SoldierWG" createUnit [_pos,_grp,"",0.4,"corporal"]
"SoldierWLAW" createUnit [_pos,_grp,"",0.4,"corporal"]
"SoldierWB" createUnit [_pos,_grp,"",0.2,"private"]
"SoldierWMG" createUnit [_pos,_grp,"",0.2,"private"]
~5
Respawn_wp_leader=leader _grp
_wppos=getWPPos [Respawn_wp_leader,0]
[Respawn_wp_leader,0] setWPPos _pos
~3
Respawn_wp_leader=leader _grp
[Respawn_wp_leader,0] setWPPos _wppos
exit
Can yous guys see anything wrong here? ie. that would mean that the created units aren't replacing the old ones?