level attack
{
	start
	{
		skybox skybox5
		light_dir 1.0 0.0 0.0
		player_ship_selection
		{
			team human
			{
				cd raw
				name ship_human0
				name ship_human1
				name ship_human2
			}
		}
		obj PlayerShip
		{
			type player_ship
			position 0.0 0.0 5000.0
			ai 0
			invincible 0
		}
		
		obj Defender0
		{
			mesh ship_human2
			type fighter_ship
			position -300.0 0.0 5000.0
			orientation 0.0 0.0 0.0 0.0
			speed 0.0 0.0 0.0
			ai 1
			friendly 1
			behavior aggresive
			health 100
		}
		obj Defender1
		{
			mesh ship_human2
			type fighter_ship
			position 300.0 0.0 5000.0
			orientation 0.0 0.0 0.0 0.0
			speed 0.0 0.0 0.0
			ai 1
			friendly 1
			behavior aggresive
			health 100
		}
		obj Defender2
		{
			mesh ship_human0
			type fighter_ship
			position -300.0 200.0 5000.0
			orientation 0.0 0.0 0.0 0.0
			speed 0.0 0.0 0.0
			ai 1
			friendly 1
			behavior aggresive
			health 100
		}
		obj Defender3
		{
			mesh ship_human2
			type fighter_ship
			position 300.0 -200.0 5000.0
			orientation 0.0 0.0 0.0 0.0
			speed 0.0 0.0 0.0
			ai 1
			friendly 1
			behavior aggresive
			health 100
		}
		obj Defender4
		{
			mesh ship_human2
			type fighter_ship
			position 300.0 250.0 5000.0
			orientation 0.0 0.0 0.0 0.0
			speed 0.0 0.0 0.0
			ai 1
			friendly 1
			behavior aggresive
			health 100
		}
		obj Attacker0
		{
			mesh ship_alien2
			type fighter_ship
			position -300.0 300.0 -300.0
			orientation 0.0 0.0 0.0 0.0
			speed 0.0 0.0 0.0
			ai 1
			friendly 0
			behavior aggresive
			health 100
			prioritize 1 player_ship
		}
		obj Attacker1
		{
			mesh ship_alien2
			type fighter_ship
			position -300.0 400.0 -300.0
			orientation 0.0 0.0 0.0 0.0
			speed 0.0 0.0 0.0
			ai 1
			friendly 0
			behavior aggresive
			health 100
			prioritize 1 player_ship
		}
		obj Attacker2
		{
			mesh ship_alien2
			type fighter_ship
			position -300.0 500.0 -300.0
			orientation 0.0 0.0 0.0 0.0
			speed 0.0 0.0 0.0
			ai 1
			friendly 0
			behavior aggresive
			health 100
			prioritize 1 player_ship
		}
	}
	event reach_destination
	{
		previous_end_cond
		{
			none
		}
		delay secs 15
		spawn
		{
			obj CargoShip0
			{
				mesh ship_alien_big0
				type cargo_ship
				position 0.0 0.0 -5000.0
				orientation 0.0 0.0 0.0 0.0
				speed 0.0 0.0 -5.0
				ai 1
				friendly 0
				health 1000
				destination 0.0 0.0 -8000.0
				reach_destination 1
				radius 50.0
			}
		}
		end_cond reach_destination_end
		{
			type win
			{
				cond win_cond
				{
					type destroyed
					objs 1 CargoShip0
					delay secs 20
				}
			}
			type loss
			{
				cond loss_cond0
				{
					type ship_destination_reached
					objs 1 CargoShip0
				}
				
			}
		}
	}
	event invasion0
	{
		previous_end_cond
		{
			none
		}
		delay secs 60
		spawn
		{
			obj Attacker3
			{
				mesh ship_alien1
				type fighter_ship
				position -300.0 300.0 -300.0
				orientation 0.0 0.0 0.0 0.0
				speed 0.0 0.0 0.0
				ai 1
				friendly 0
				behavior aggresive
				health 100
				prioritize 1 cargo_ship
			}
			obj Attacker4
			{
				mesh ship_alien1
				type fighter_ship
				position -300.0 400.0 -300.0
				orientation 0.0 0.0 0.0 0.0
				speed 0.0 0.0 0.0
				ai 1
				friendly 0
				behavior aggresive
				health 100
				prioritize 1 cargo_ship
			}
			obj Attacker5
			{
				mesh ship_alien1
				type fighter_ship
				position -300.0 500.0 -300.0
				orientation 0.0 0.0 0.0 0.0
				speed 0.0 0.0 0.0
				ai 1
				friendly 0
				behavior aggresive
				health 100
				prioritize 1 cargo_ship
			}
		}
		end_cond invasion0_end
		{
			
			type loss
			{
				cond loss_cond1
				{
					type time_elapsed
					secs 600
				}
			}
		}
	}
	event invasion1
	{
		previous_end_cond
		{
			none
		}
		delay secs 120
		spawn
		{
			obj Attacker6
			{
				mesh ship_alien2
				type fighter_ship
				position -300.0 300.0 -300.0
				orientation 0.0 0.0 0.0 0.0
				speed 0.0 0.0 0.0
				ai 1
				friendly 0
				behavior aggresive
				health 100
				prioritize 1 cargo_ship
			}
			obj Attacker7
			{
				mesh ship_alien2
				type fighter_ship
				position -300.0 400.0 -300.0
				orientation 0.0 0.0 0.0 0.0
				speed 0.0 0.0 0.0
				ai 1
				friendly 0
				behavior aggresive
				health 100
				prioritize 1 cargo_ship
			}
			obj Attacker8
			{
				mesh ship_alien2
				type fighter_ship
				position -300.0 500.0 -300.0
				orientation 0.0 0.0 0.0 0.0
				speed 0.0 0.0 0.0
				ai 1
				friendly 0
				behavior aggresive
				health 100
				prioritize 1 cargo_ship
			}
		}
		end_cond invasion1_end
		{
			
			type loss
			{
				cond loss_cond1
				{
					type time_elapsed
					secs 600
				}
			}
		}
	}
	event cargo_ship_exit
	{
		previous_end_cond
		{
			prev_conds 1 reach_destination
		}
		delay secs 5
		exit
		{
			objs 1 CargoShip0
		}
		delay secs 3
		end_cond ship_exit
		{
			type loss
			{
				cond loss_cond0
				{
					type exited
					objs 1 CargoShip0
				}
			}
		}
	}
	end
	{
		events 1 reach_destination
		ignore_loss_events 1 reach_destination
	}
}
