"respawn_west", "respawn_east" are only used as respawn points in "BASE" respawn mode. "INSTANT" makes you respawn where you died.
Although your method, assuming you use "BASE" respawn, will work if there is only one group per side, it won't work in most missions.
// Remember to place the side spawn markers in a safe position.
respawn = "BASE";
respawnDelay = 10;
if (not isDedicated) then {
[] spawn {
waitUntil { alive player };
player addEventHandler ["KILLED", {
[] spawn
{
waitUntil { alive player };
if ((alive (leader player)) and (player != (leader player))) then {
// Move the player just behind the leader, but ensure they arrive on the ground.
_spawnPos = getPos ((vehicle _leader) modelToWorld [0, -2, 0]);
_spawnPos set [2, 0];
player setPos _spawnPos;
};
};
}];
};
};
Note: This doesn't take into account vehicles, since that is a bit messy (and I can't be bothered right now, but if it is important, maybe someone else could deal with that special case for you using
emptyPositions). You'll spawn in just behind the leader (or leader's vehicle) and hope that the leader isn't on the edge of a cliff, in a plane or driving a tank backwards
You could also use
BIS_fnc_findSafePos (from BIS Functions module) to find a clear position in which to spawn.
NOTE: All example code UNTESTED!
EDIT: Remembered additional spawn required. Also should ensure that leader is alive before spawning on them.