"use strict";
this.name = "coyoteMamba1";
this.author = "Okti";
this.copyright = "(C) Okti";
this.licence = "Creative Commons Attribution - Non-Commercial - Share Alike 3.0";
this.description = "Ship script for coyoteMamba 1.";

this.shipSpawned = function () {
	//this.ship.reportAIMessages = true;
}

this.flee = function () {
	missionVariables.CoyoteFerdie_status = "FLEE";
}

this.shipDied = function () {
	missionVariables.CoyoteFerdie_status = "FLEE";
}

this.checkPilotRescue = function () {
	if (missionVariables.CoyotePhythonPilot = "RESCUED") {
		this.ship.position = player.ship.position.add(player.ship.vectorForward.multiply(25000));
		this.ship.target = player.ship;
		this.ship.reactToAIMessage("ATTACK_PLAYER");
	}
}

this.locatePlayer = function () {
	this.playerArray = system.shipsWithPrimaryRole("player");
	if (this.playerArray.length == 0) {
		this.ship.remove();
	} else {
		this.ship.target = this.playerArray[0];
		this.ship.reactToAIMessage("PLAYER_FOUND");
	}
}