function DashRaceTimeOver() local Event = EventClass.Event; Event:Pause(); Event:LockPlayer(); coroutine.yield(); Event:Print("/vnYou didn’t complete the/r"); Event:Print("race within the time limit./b/co"); Event:WaitContinue(); coroutine.yield(); Event:CloseMessage(); coroutine.yield(); Event:Print("Try again?/b/co"); Event:WaitContinue(); coroutine.yield(); Event:Select(); coroutine.yield(); if ( Event:GetSelect() == 0 ) then Event:CloseMessage(); coroutine.yield(); Event:Wait(1.0) coroutine.yield(); Event:FadeOut(); coroutine.yield(); Event:Play(); Event:StopBgm(); Event:ContinueMiniGame(); Event:FadeIn(); coroutine.yield(); Event:GetSetRace(); return; end Event:CloseMessage(); coroutine.yield(); Event:Wait(1.0) coroutine.yield(); local stage = Event:GetMiniGameStage(); Event:FadeOut(); Event:Wait(1.0) coroutine.yield(); Event:StopBgm(); Event:SetPlayerDirection(0); coroutine.yield(); Event:EquipSword(); Event:DestroyMiniGame(); Event:Play(); Event:UnlockPlayer(); if ( stage == 1 ) then Event:SetMap("D_21_3","-gDebug"); elseif ( stage == 2 ) then Event:SetMap("D_24_1","-gDebug"); end coroutine.yield(); end