function init()
	gun.name = "Gravity Gun"
	gun.fireDelay = 1000
	--gun.shotrange = 300		--radius to hold stuff
	--gun.shotspeed = 400		--force with which to shoot stuff out
	--gun.shotdamage = 400		--force with which to pull stuff in
	
	gun.chargeTime = 400
	
	gun.skipUpdate = 0		--don't skip update function
	return 0
end

function update()
	charge = math.abs(gun.charge)

	--once we've started holding down the button
	if charge > 0 then
		stage.makeGravityWell(gun.burstx, gun.bursty, 350, 2.75, -1, 60)
		well.ignorePlaceholder(gun.owner)
		
		--stage.createEmitter("blackhole", gun.burstx, gun.bursty)
		--emitter.lifetimer = 220
		--emitter.scale = .3
		--emitter.alpha = .3
		--emitter.layer = 3
		--emitter.upload()
	end
	
	return 0
end

function fire()
	
	
	--push everything away with the force of our charge
	
	--find a place a little behind the held stuff
	dx = gun.burstx - gun.owner.x
	dy = gun.bursty - gun.owner.y
	theta = math.atan2(dy, dx)
	dist = math.sqrt(dx^2 + dy^2) - 64
	
	blastx = gun.owner.x + dist * math.cos(theta)
	blasty = gun.owner.y + dist * math.sin(theta)
	stage.makeGravityWell(blastx, blasty, 350, 24, 1, 60)
	well.ignorePlaceholder(gun.owner)
	
	
	return 0
end

function shot_update()

	return 0
end