-- TEMPLATE MISSION SCRIPT : SANDBOX --
-- Bare-bones script, just fly around until you go through a gate or exit manually.
-- It'll endlessly revive you if you die.

function init()
	--sets the default music of the stage
	stage.setMusic("music_mission2.ogg")
	
	--start the player at the correct waypoint
	stage.waypointStart = 0
	
	--track all created ships of this faction
	stage.trackFaction = 3
	
	--loads the map
	stage.loadMap("asteroidbelt")
	
	--starting messages
	stage.newMessage("FLY PILOT AND BECOME LEAF ON THE WIND", "stolenrobot")
	stage.newShakyText("ENJOY VACATION")
end

function update()
	--soft springy borders
	stage.borders()

	--revive dead players at random waypoint
	stage.reviveDeadPlayers(math.random(0,(stage.waypoint_count()-1)))
end