function GunnerCreate(me)
	--SetHealth(me,5)
	SetHealth(me,math.random(2,6)) --Add in some spice
	SetPalette(me,14)
	SetPower(me,3)
end

function GunnerCollide(me, you)
	power = GetPower(you)
	TakeDamage(me, power)
end

function GunnerDeath(me)
	child = CreateObject(me,"Death","EnemyFX", 0,11,1,false)
	SetSFX(child,true)
	MoveObject(child,32,0)
end

function GunnerUpdate(me)
	if IsPlaying(me,"Stand")
	then
 
		if PlayerDistanceX(me) < 128 and AnimationLoops(me) > 1
		and EndOfAnimation(me)
		then
			ChangeAnimation(me,"Shoot")
		end
	elseif IsPlaying(me,"Shoot")
	then
		if HitFrame(me, 3)
		then
			child = CreateObject(me, "Bullet","EnemyWeapons",3,13,1,true)
			MoveObject(child,0,-13)
		end
		if EndOfAnimation(me) 
		then
			ChangeAnimation(me, "Stand")
		end
	end
	
end