diff --git a/dat/missions/empire/collective/ec06.lua b/dat/missions/empire/collective/ec06.lua index 2c1cac5..8922a17 100644 --- a/dat/missions/empire/collective/ec06.lua +++ b/dat/missions/empire/collective/ec06.lua @@ -88,6 +88,8 @@ function jump() sys = space.getSystem() if misn_stage == 0 then + offset = 500 + -- Entering target system? if sys == misn_target_sys then -- Create big battle. @@ -99,9 +101,12 @@ function jump() emp_fleets[1] = "Empire Sml Attack" emp_fleets[2] = "Empire Sml Attack" emp_fleets[3] = "Draktharr Goddard" -- They help empire. + -- Get position + x, y = enter_vect:get() + -- Add pilots. for k,v in ipairs(emp_fleets) do - enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) ) - pilot.add( v, "def", enter_vect ) + spawn_vect:add(rnd.int(-offset, offset), rnd.int(-offset, offset)) + pilot.add(v, "def", spawn_vect) end -- Collective. col_fleets = {} @@ -110,12 +115,12 @@ function jump() col_fleets[3] = "Collective Sml Swarm" -- Set up position. x,y = enter_vect:get() - enter_vect:set(-x, -y) + spawn_vect = enter_vect.new(-x, -y) -- Count amount created col_alive = 0 for k,v in ipairs(col_fleets) do - enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) ) - pilots = pilot.add( v, "def", enter_vect ) + spawn_vect:add(rnd.int(-offset, offset), rnd.int(-offset, offset)) + pilots = pilot.add(v, "def", spawn_vect) col_alive = col_alive + #pilots for k,v in ipairs(pilots) do hook.pilot( v, "disable", "col_dead" ) @@ -137,9 +142,13 @@ function jump() emp_fleets[1] = "Empire Lge Attack" emp_fleets[2] = "Empire Med Attack" emp_fleets[3] = "Draktharr Goddard" -- They help empire. + -- Get position. + x, y = enter_vect:get() + spawn_vect = enter_vect.new(x, y) + -- Add pilots. for k,v in ipairs(emp_fleets) do - enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) ) - pilot.add( v, "def", enter_vect ) + spawn_vect:add(rnd.int(-offset,offset), rnd.int(-offset, offset)) + pilot.add(v, "def", spawn_vect) end -- Collective. col_fleets = {} @@ -149,12 +158,14 @@ function jump() if var.peek("trinity") == true then col_fleets[4] = "Trinity" end + -- Set up position. x,y = enter_vect:get() - enter_vect:set(-x, -y) + spawn_vect = enter_vect.new(-x, -y) + -- Add pilots. col_alive = 0 for k,v in ipairs(col_fleets) do - enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) ) - pilots = pilot.add( v, "def", enter_vect ) + spawn_vect:add(rnd.int(-offset, offset), rnd.int(-offset, offset)) + pilots = pilot.add(v, "def", spawn_vect) -- Handle special ships. if v == "Starfire" then