-- chess.levelgen
core1 = levelgen:findObjectById(1)
core2 = levelgen:findObjectById(2)
hasRun = false
                     ------------------------------------------------------//Subscribed functions

function onTick(deltaTime)
	if(core1:getPos() == nil or core2:getPos() == nil) then
		globalMsg("CHECK MATE")
	end
	
	if(hasRun == false) then
		Timer:scheduleOnce(function() globalMsg("YOU ARE NOT READY FOR THIS MAP") end, 1000)
		Timer:scheduleOnce(function() globalMsg("As for me, I'll be a knight.") end, 60000)
		Timer:scheduleOnce(function() globalMsg("Ron, you don't suppose this'll be like real wizard's chess do you?") end, 120000)
		Timer:scheduleOnce(function() globalMsg("Do you wanna stop Snape from getting that Stone or not?") end, 180000)
		Timer:scheduleOnce(function() globalMsg("Harry, it's you that has to go on, I know it. Not me, not Hermoine! You!") end, 240000)
		hasRun = true
	end
end			

  -----------------------------------------------------------//Main
function main()
	subscribe(Event.Tick)
end