
.namespace hotspotgrappin

function OnActivate()

	if self.Name == "FireHotspot" then
	
		if fire==1 then
			PlaySoundEffect("gmp_hook", true)
			vo=v
			cond3=0
			fire=2
		elseif fire==0 then
			fire=1
			a1=a
		elseif fire==2 then
			traj.Lifetime=0
			grappin1.Rotation=0
			grappin1.Position_X = posxini
			grappin1.Position_Y = posyini
			v = v1	--reinitialise la puissance
			fire=0
			a1=0
			vo=0
			x=0
			y=0
			cond3=0
		end
	
	end
	
	if self.Name == "AngleplusHotspot"  then
		grappin1.Rotation=grappin1.Rotation+math.rad(5)
	end
	
	if self.Name == "AnglemoinsHotspot"  then
		grappin1.Rotation=grappin1.Rotation-math.rad(5)
	end
	
	if self.Name == "PuissanceplusHotspot" and v <= 30 then
		v=v+1
	end
	
	if self.Name == "PuissancemoinsHotspot" and v >= 0 then
		v=v-1
	end
	
end



function OnEnable()
	AreaHotspot.OnEnable()
	
end

function GetSpecificCursor()
	return CURSOR_AREA_HOTSPOT
end

function PrivateCanClickOn()
	return true
end

