local cartObj, bItsMoving
local playedFreeze = false
local bFoundBoost, bSawPath, bFoundRope, bOhNo, bPinTop
local bDocksBtrPlaying = false
function OnScriptLoaded(level, obj)
  cartObj = GameObjects.SonCart_CrankSetup
  game.SubObject.Sleep(obj)
  game.SubObject.SetForgetOnCheckpoint(obj)
end
function OnStart(level, obj)
end
function PlayItsMoving()
  if game.Level.GetVariable("CompletedCineNumber") == 360 and not bItsMoving and bDocksBtrPlaying == false then
    bItsMoving = true
    game.Audio.PlayBanter("stn_PlatformPuzzle1")
  end
end
function PlayFoundBoost()
  if not bFoundBoost and bDocksBtrPlaying == false then
    bFoundBoost = true
    game.Audio.PlayBanter("stn_PlatformPuzzle2")
  end
end
function PlayPathOther()
  if game.Level.GetVariable("CompletedCineNumber") == 360 and not bSawPath then
    bSawPath = true
    game.Audio.PlayBanter("stn_PlatformPuzzle3_RopeDrop")
  end
end
function PlayFoundRope()
  if not bFoundRope then
    bFoundRope = true
    game.Audio.PlayBanter("stn_PlatformPuzzle3_Climb")
  end
end
function PlayOhNo()
  if not bOhNo then
    bOhNo = true
    game.Audio.PlayBanter("stn_PlatformPuzzle3_NoFreeze")
  end
end
function PlayThatDidIt()
  if game.Level.GetVariable("CompletedCineNumber") == 360 and not bPinTop then
    bPinTop = true
    game.Audio.PlayBanter("stn_PlatformPuzzle3_Freeze")
  end
end
function PlayFishingDocks()
  bDocksBtrPlaying = true
  game.Audio.PlayBanter("stn_FishingDocks", DocksBtrPlaying)
end
function DocksBtrPlaying()
  bDocksBtrPlaying = false
end
function PlayPlatPuzzleNoFreeze()
  if cartObj.AnimFrame ~= cartObj.AnimLengthFrames and not playedFreeze then
    game.Audio.PlayBanter("stn_PlatformPuzzle3_NoFreeze")
  end
end
function PlayPlatPuzzleFreeze()
  if cartObj.AnimFrame == cartObj.AnimLengthFrames and not playedFreeze then
    playedFreeze = true
    game.Audio.PlayBanter("stn_PlatformPuzzle3_Freeze")
  end
end
function PlayPlatPuzzleClimb()
  game.Audio.PlayBanter("stn_PlatformPuzzle3_Climb")
end
function PlayPlatPuzzleRopeDrop()
  game.Audio.PlayBanter("stn_PlatformPuzzle3_RopeDrop")
end
