"use strict";
this.name = "TCAT_nailBomb";
this.author = "Thargoid";
this.copyright = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "Ship script for the Thargoid 'Nailbomb' missile";
this.version = "2.0";

//----------------------------------------------------------------------------------------
this.spawnNails = function () {
	var loopCounter = 0; // reset the counter
	for (loopCounter = 0; loopCounter < 9; loopCounter++) {
		var Nail = this.ship.spawnOne("TCAT_nail");
		this.xDistance = ((Math.random() * 4) - 2);
		this.yDistance = ((Math.random() * 4) - 2);
		this.zDistance = ((Math.random() * 4) - 2);
		Nail.position = this.ship.position.add([this.xDistance, this.yDistance, this.zDistance]);
	}
}

