function BlueStuff_process( inst, key )
	local value = inst
	if value.y > 400 then
		delete( enemies, key )
	else
		if value.x > players[value.target].x + 2 then
			value.vel[1] = -2*value.retreat
		elseif value.x < players[value.target].x - 2 then
			value.vel[1] = 2*value.retreat
		elseif time - value.last_shot > (300 * options.enemy_reload) then
			value.last_shot = time
			PlaySnd( "shot3.wav", true, value.x, value.y )
			CreateSimpleBullet( value.x, value.y, { 0, 3 }, { .3, .3, 1, 1 } )
			CreateSimpleBullet( value.x, value.y, { 0.45, 2.96 }, { .3, .3, 1, 1 } )
			CreateSimpleBullet( value.x, value.y, { -0.45, 2.96 }, { .3, .3, 1, 1 } )
			value.retreat_time = 100
			value.retreat = -0.5
		else
			value.vel[1] = 1
		end
	end
	if value.retreat_time > 0 then 
		value.retreat_time = value.retreat_time - 1
		if value.retreat_time == 0 then
			value.retreat = 1
		end
	end
end

function CreateBlueStuff( x )
	local spr = CreateSprite( "sprite", x, -400 )
	SetObjAnim( spr, 5, false )
	SetObjSpriteColor( spr, {.1, .1, 1, 1} )
	SetObjSpriteColor( spr, RGB(241, 61, 61), 0 )
	table.insert( enemies,
				{
					sprite = spr,
					x = x,
					y = -400,
					size = 16,
					speed = 1,
					last_shot = 0,
					score = 150,
					vel = { 0, 1 },
					process = BlueStuff_process,
					retreat = 1,
					retreat_time = 0,
					target = math.random( 1, players_num ),
				} )
end