team.set_primary_respawn_object

This function appears to set a team's default respawn object, when co-op spawning is enabled.

Arguments

respawn

The object to use as a respawn point.

Example

-- Set a team's primary respawn object to the object with a specific label 
-- and the lowest spawn sequence on the map.

do
   alias lowest = global.number[0]
   --
   lowest = 32767
   for each object with label "defend_res_zone" do
      if current_object.spawn_sequence < lowest then
         lowest = current_object.spawn_sequence
         team[0].set_primary_respawn_object(current_object)
      end
   end
end

See also