Rommel's does mostly the same as mine, but uses an continual loop rather than an event handler, so is less efficient. It also doesn't place the player behind the leader. Also, when there is no leader alive to spawn at, you will respawn out at sea ([0, 0, 0], the position of nullObject) rather than at base (all easy to add, but just so you know
).
Does have the advantage that moving the spawn-point means that you will automatically spawn in a safe place, rather than in a wall, which is a big boon. Well, at least I assume respawn is that clever.
Scripts could be merged though, to get the best of both worlds.
@Rommel:
waituntil {
"respawn_west" setMarkerPosLocal (getPos leader player);
sleep 0.5;
0 > 1
};
Is clearer as:
while { true } do {
"respawn_west" setMarkerPosLocal (getPos leader player);
sleep 0.5;
};
Since
waitUntil implies you are running once-per-frame.
while is better for loops with
sleep in.