-- See logic "SilentTeleportLineTrigger" for instruction

function main(self)
	if self.State == 0 then
		self.HitFlags.Player = true
		self.HitRect = {-20,-20,20,20}
		self.State = 1
	end
end

function hit(self)
	if self.State == 1 then
		self.HitFlags.Player = false
		PlaySound("GAME_CRATEDAMAGE")
		CreateObject{
			X = self.XTweak,
			Y = self.YTweak,
			name="SilentTeleportLine",
			Direction = self.Direction,
			SpeedX = self.SpeedX,
			SpeedY = self.SpeedY,
			Width = self.Width,
			Height = self.Height,
			Smarts = self.Smarts
		}
		self:SetFrame(2)
		self.State = 2
	end
end