local banterPlayed = {}
function OnScriptLoaded(level, obj)
  game.SubObject.Sleep(obj)
end
function OnSaveCheckpoint(level, obj)
  local savedInfo = {}
  savedInfo.banterPlayed = banterPlayed
  return savedInfo
end
function OnRestoreCheckpoint(level, obj, savedInfo)
  if savedInfo ~= nil then
    banterPlayed = savedInfo.banterPlayed
  end
end
function AxeEmbed()
  if GameObjects.Gate.AnimFrame > 25 and banterPlayed.GateCommit and not banterPlayed.Portcullis and game.Level.GetVariable("CompletedCineNumber") < 135 then
    banterPlayed.Portcullis = true
    game.Audio.PlayBanter("RIV_PortcullisPuzzle")
  end
end
function Set_GateCommit_Played()
  banterPlayed.GateCommit = true
end
