function Create(self)

	self.moveAmount = 3;
	self.adjustmentAmount = 0.2; -- 0.05
	self.targetingAdjustmentAmount = 0.2;

	self.currentDirection = Vector(self.Vel.X,self.Vel.Y):SetMagnitude(self.moveAmount):RadRotate((math.random()*2)-1);
	self.moveDirection = self.currentDirection;

	self.PinStrength = 1000;

	local raylength = 800;
	local rayPixSpace = 5;

	local dots = math.floor(raylength/rayPixSpace);

	for i = 1, dots do
		local checkPos = self.Pos + Vector(self.Vel.X,self.Vel.Y):SetMagnitude((i/dots)*raylength);
		if SceneMan.SceneWrapsX == true then
			if checkPos.X > SceneMan.SceneWidth then
				checkPos = Vector(checkPos.X - SceneMan.SceneWidth,checkPos.Y);
			elseif checkPos.X < 0 then
				checkPos = Vector(SceneMan.SceneWidth + checkPos.X,checkPos.Y);
			end
		end
		local terrCheck = SceneMan:GetTerrMatter(checkPos.X,checkPos.Y);
		if terrCheck == 0 then
			local moCheck = SceneMan:GetMOIDPixel(checkPos.X,checkPos.Y);
			if moCheck ~= 255 then
				local actor = MovableMan:GetMOFromID( MovableMan:GetMOFromID(moCheck).RootID );
				if actor.Team ~= self.Team then
					self.target = actor;
					break;
				end
			end
		else
			self.tPos = checkPos;
			break;
		end
		if i == dots then
			self.tPos = checkPos;
		end
	end

	self.seekerTimer = Timer();
	self.delayMoveTimer = Timer();
	self.lifeTimer = Timer();
	self.asplode = false;

	self.seekerDelay = math.floor(1000-(math.random()*1000));

end

function Update(self)

	if self.delayMoveTimer:IsPastSimMS(1) then
		self.delayMoveTimer:Reset();

		local useAdjust = self.adjustmentAmount;

		if self.target ~= nil and self.target.ID ~= 255 then
			self.tPos = Vector(self.target.Pos.X,self.target.Pos.Y);
			useAdjust = self.targetingAdjustmentAmount;
			self.seekerDelay = 0;
		else
			self.target = nil;
		end

		if self.tPos ~= nil then
			local checkDirB = SceneMan:ShortestDistance(self.Pos,self.tPos,SceneMan.SceneWrapsX);
			if checkDirB.Magnitude < 10 then
				self.asplode = true;
			end
			local checkDir = checkDirB:SetMagnitude(useAdjust);
			self.moveDirection = (self.currentDirection + checkDir):SetMagnitude(self.moveAmount);
			self.Pos = Vector(self.Pos.X+self.moveDirection.X,self.Pos.Y+self.moveDirection.Y);
			self.currentDirection = Vector(self.moveDirection.X,self.moveDirection.Y);

			if self.seekerTimer:IsPastSimMS(self.seekerDelay) and self.target == nil then
				self.seekerTimer:Reset();
				self.seekerDelay = math.floor(1000-(math.random()*1000));
				for actor in MovableMan.Actors do
					if actor.Team ~= self.Team then
						self.potentialtargetdist = SceneMan:ShortestDistance(self.Pos,actor.Pos,SceneMan.SceneWrapsX);
						if (self.lastdist == nil or (self.lastdist ~= nil and self.potentialtargetdist.Magnitude < self.lastdist)) and self.potentialtargetdist.Magnitude <= 500 and SceneMan:CastStrengthRay(self.Pos,self.potentialtargetdist:SetMagnitude(self.potentialtargetdist.Magnitude-actor.Radius),0,Vector(0,0),5,0,SceneMan.SceneWrapsX) == false then
							self.lastdist = self.potentialtargetdist.Magnitude;
							self.target = actor;
							self.lasttargetpos = Vector(self.target.Pos.X,self.target.Pos.Y);
						end
					end
				end
			end
		end

		local effectParA = CreateMOPixel("Dihelical Cannon Front Effect Particle");
		effectParA.Pos = self.Pos;
		MovableMan:AddParticle(effectParA);

		local effectParB = CreateMOPixel("Dihelical Cannon Effect Particle");
		effectParB.Pos = self.Pos;
		MovableMan:AddParticle(effectParB);
	end

	if self.lifeTimer:IsPastSimMS(8000) then
		self.asplode = true;
	end

	local terrCheck = SceneMan:GetTerrMatter(self.Pos.X,self.Pos.Y);
	if terrCheck == 0 then
		local moCheck = SceneMan:GetMOIDPixel(self.Pos.X,self.Pos.Y);
		if moCheck ~= 255 then
			local actor = MovableMan:GetMOFromID( MovableMan:GetMOFromID(moCheck).RootID );
			if actor.Team ~= self.Team then
				self.asplode = true;
			end
		end
	else
		self.asplode = true;
	end

	if self.asplode then
		if self.tPos ~= nil then
			for i = 1, 4 do
				local damagePar = CreateMOPixel("Dihelical Damage Particle");
				damagePar.Vel = SceneMan:ShortestDistance(self.Pos,self.tPos,SceneMan.SceneWrapsX):SetMagnitude(50);
				damagePar.Pos = self.Pos;
				damagePar.Team = self.Team;
				damagePar.IgnoresTeamHits = true;
				MovableMan:AddParticle(damagePar)
			end
			for i = 1, 3 do
				local effectPar = CreateMOPixel("Dihelical Cannon Front Effect Particle");
				effectPar.Pos = self.Pos + Vector(math.random()*25,0):RadRotate(math.random()*6.283);
				MovableMan:AddParticle(effectPar);
			end
		end
		local asplosion = CreateMOSRotating("Nucleo Swarm Explosion");
		asplosion.Pos = self.Pos;
		asplosion:GibThis();
		MovableMan:AddParticle(asplosion);
		self.ToDelete = true;
	end

end