-- -- Autor: Catalin Marcu -- Date: 20-09-2009 -- -- Main loading script -- local musicStarted = false --=============================================================================== function getGroupText(index) if (index == 1) then return { scale = 0.1, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtExit } elseif (index == 2) then return { name = "GroupScreenText", scale = 0.08, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtGroupMatches } elseif (index == 3) then return { scale = 0.1, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtOk } elseif (index == 4) then return { scale = 0.1, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtWorldChallengeTitle } end end --=============================================================================== function getResultsText(index) if (index == 2) then return { scale = 0.1, font = "font4.fnt", overlap = -3, color = {255, 255, 255, 255}, vertical = E_VALIGN_CENTER, text = txtGroup .. " " .. getUserGroupLetter() .. " - " .. txtStandings } elseif (index == 3) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtTeam } elseif (index == 4) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtWon } elseif (index == 5) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtLost } elseif (index == 6) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtGoalsFor } elseif (index == 7) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtGoalsAgainst } elseif (index == 8) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtGoalDifference } elseif (index == 9) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtPoints } end end --=============================================================================== function getUserGroupLetter() local groupLetters = {"A", "B", "C", "D", "E", "F", "G", "H"} return groupLetters[userGroup + 1] end --=============================================================================== function startNewWorldCup() StartWorldCup() -- SetUserTeam(firstTeamIndex) -- userTeamId = firstTeamIndex userGroup = GetTeamGroup(userTeamId) continueSimulation = true goToGroupResults() LogEvent("BeginTournament") end --=============================================================================== function goToGroupResults() groupButtonsActive = false currentScreen = SCREEN_GROUP_STANDINGS if (musicStarted == false) then musicStarted = true StartMenuMusic(MenuSounds.Music.groups) end if (continueSimulation == true) then continueSimulation = false SimulateCPUMatches() SaveWorldCup() end if (ExistsActor("MenuPlayer") == true) then DestroyActor("MenuPlayer") end if (ExistsActor("GroupButtons") == false) then CreateActor("ActorGeom", {name = "GroupButtons", model = "Screen_groupbuttons.mesh", touchable = true, camera = "backgroundCamera"}) SetActorAnimPenalty("GroupButtons", { anim = "Screen_groupbuttons_in.anm", loop = false }) end SetText("GroupScreenText", txtGroupMatches) Sound.PlaySound(MenuSounds.Fx.panelIn, false) if (ExistsActor("GroupResults") == false) then CreateActor("ActorGeom", {name = "GroupResults", model = "Screen_results.mesh", touchable = false, camera = "backgroundCamera"}) else ActivateActor("GroupResults") end SetActorAnimPenalty("GroupResults", { anim = "screen_results_in.anm", loop = false }) EnqueueExecuteScript("GroupResults", "populateGroupResults(1)") allowBackButton = true end --=============================================================================== function populateGroupResults(callCount) local teamIndex = callCount local xPos = { -175, -12, 28, 71, 112, 153, 195 } local yPos = 12 - (teamIndex - 1) * 25.5 local textSize = 0.65 local flagXSize = 12 local flagYSize = 12 local flagXOffset = 18 local flagYOffset = 9 local groupTeamProperties = GetGroupTeam(teamIndex - 1, userGroup)--store the properties of the group teams: name, id, wins, loses, goals for, goals against if (groupTeamProperties[2] == userTeamId) then -- this is the user team CreateActor("ActorGeom", { name = "UserTeamBar", model = "screen_bar_idle.mesh", touchable = false, camera = "backgroundCamera" }) local tempX = {0, 0, 0, 0} local tempY = {0, -3.1, -6.2, -9.3} local tempZ = {0, 0, 0, 0} SetActorPosition("UserTeamBar", { tempX[teamIndex], tempY[teamIndex], tempZ[teamIndex] }) end if (IPAD_VERSION == true) then textSize = 1.35 flagXSize = 25 flagYSize = 25 flagXOffset = 40 flagYOffset = 25 yPos = 20 - (teamIndex - 1) * 54.5 xPos = { -400, -25, 59, 158, 245, 330, 420 } end -- for android, scale the iPhone positions according to the real viewport aspect ratio. if ANDROID_VERSION == true then local vpWidth, vpHeight = GetViewportSize() local xRatio = vpWidth / 480 local yRatio = vpHeight / 320 local minRatio = math.min(xRatio, yRatio) for i=1,#xPos do xPos[i] = xPos[i] * xRatio end yPos = yPos * yRatio textSize = textSize * minRatio flagXSize = flagXSize * xRatio flagYSize = flagYSize * yRatio flagXOffset = flagXOffset * xRatio flagYOffset = flagYOffset * yRatio end setCurrentTeam(groupTeamProperties[2]) -- defined in teams.lua CreateActorImage("Team" .. teamIndex .. "Flag", xPos[1] - flagXOffset, yPos + flagYOffset, flagXSize, flagYSize, currentTeam.flag, 255, 255, 255, 255, "") CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "NameText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_LEFT, vertical = E_VALIGN_BOTTOM, x = xPos[1], y = yPos, text = groupTeamProperties[1] }) CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "WonText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_BOTTOM, x = xPos[2], y = yPos, text = "" .. groupTeamProperties[3] }) CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "LostText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_BOTTOM, x = xPos[3], y = yPos, text = "" .. groupTeamProperties[4] }) CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "GoalsForText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_BOTTOM, x = xPos[4], y = yPos, text = "" .. groupTeamProperties[5] }) CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "GoalsAgainstText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_BOTTOM, x = xPos[5], y = yPos, text = "" .. groupTeamProperties[6] }) CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "GoalDifferenceText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_BOTTOM, x = xPos[6], y = yPos, text = "" .. (groupTeamProperties[5] - groupTeamProperties[6]) }) CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "PointsText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_BOTTOM, x = xPos[7], y = yPos, text = "" .. (groupTeamProperties[3] * 3) }) if (callCount < 4) then EnqueueTimeExecuteScript("populateGroupResults(" .. (callCount + 1) .. ")", 0.08) else groupButtonsActive = true end end --=============================================================================== function exitGroupResults(functionName) for index = 1, 4 do DestroyActor("Team" .. index .. "Flag") DestroyActor("Team" .. index .. "NameText") DestroyActor("Team" .. index .. "WonText") DestroyActor("Team" .. index .. "LostText") DestroyActor("Team" .. index .. "GoalsForText") DestroyActor("Team" .. index .. "GoalsAgainstText") DestroyActor("Team" .. index .. "GoalDifferenceText") DestroyActor("Team" .. index .. "PointsText") end DestroyActor("UserTeamBar") SetActorAnimPenalty("GroupResults", { anim = "Screen_results_out.anm", loop = false }) Sound.PlaySound(MenuSounds.Fx.panelOut, false) EnqueueExecuteScript("GroupResults", "DestroyActor(\"GroupResults\")") if (functionName ~= "") then EnqueueExecuteScript("GroupResults", functionName) end end --=============================================================================== function getMatchesText(index) if (index == 1) then return { scale = 0.1, font = "font4.fnt", overlap = -3, color = {255, 255, 255, 255}, vertical = E_VALIGN_CENTER, text = txtGroup .. " " .. getUserGroupLetter() .. " - " .. txtMatches } elseif (index == 2) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_LEFT, vertical = E_VALIGN_CENTER, text = txtHomeTeam } elseif (index == 3) then return { scale = 0.09, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_CENTER, text = txtAwayTeam } end end --=============================================================================== function goToGroupMatches() groupButtonsActive = false currentScreen = SCREEN_GROUP_MATCHES if (musicStarted == false) then musicStarted = true StartMenuMusic(MenuSounds.Music.groups) end if (ExistsActor("MenuPlayer") == true) then DestroyActor("MenuPlayer") end if (ExistsActor("GroupButtons") == false) then CreateActor("ActorGeom", {name = "GroupButtons", model = "Screen_groupbuttons.mesh", touchable = true, camera = "backgroundCamera"}) SetActorAnimPenalty("GroupButtons", { anim = "Screen_groupbuttons_in.anm", loop = false }) end Sound.PlaySound(MenuSounds.Fx.panelIn, false) SetText("GroupScreenText", txtGroupStandings) if (ExistsActor("GroupMatches") == false) then CreateActor("ActorGeom", {name = "GroupMatches", model = "Screen_matches.mesh", touchable = false, camera = "backgroundCamera"}) else ActivateActor("GroupMatches") end SetActorAnimPenalty("GroupMatches", { anim = "Screen_matches_in.anm", loop = false }) EnqueueExecuteScript("GroupMatches", "populateGroupMatches(1)") allowBackButton = true end --=============================================================================== function populateGroupMatches(callCount) local matchIndex = callCount local xPos = { -175, -12, 0, 12, 175 } local yPos = 42 - (matchIndex - 1) * 25.4 local textSize = 0.65 local flagXSize = 12 local flagYSize = 12 local flagXOffset = 18 local flagYOffset = 9 local groupMatchProperties = GetGroupMatch(matchIndex - 1, userGroup) --store the properties of the group match: teamA id, scoreA, scoreB, teamB id if (IsUserGroupMatch(matchIndex - 1, userGroup) == true) then -- this match isplayed by the user team CreateActor("ActorGeom", { name = "UserTeamBar" .. matchIndex, model = "screen_bar_idle.mesh", touchable = false, camera = "backgroundCamera" }) local tempX = {0, 0, 0, 0, 0, 0} local tempY = {3.7, 0.6, -2.5, -5.6, -8.7, -11.8} local tempZ = {0, 0, 0, 0, 0, 0} SetActorPosition("UserTeamBar" .. matchIndex, { tempX[matchIndex], tempY[matchIndex], tempZ[matchIndex] }) end setCurrentTeam(groupMatchProperties[1]) -- defined in teams.lua local teamIndex = (matchIndex - 1) * 2 if (IPAD_VERSION == true) then textSize = 1.35 flagXSize = 25 flagYSize = 25 flagXOffset = 40 flagYOffset = 25 yPos = 85 - (matchIndex - 1) * 54.5 xPos = { -400, -25, 0, 25, 400 } end -- for android, scale the iPhone positions according to the real viewport aspect ratio. if ANDROID_VERSION == true then local vpWidth, vpHeight = GetViewportSize() local xRatio = vpWidth / 480 local yRatio = vpHeight / 320 local minRatio = math.min(xRatio, yRatio) for i=1,#xPos do xPos[i] = xPos[i] * xRatio end yPos = yPos * yRatio textSize = textSize * minRatio flagXSize = flagXSize * xRatio flagYSize = flagYSize * yRatio flagXOffset = flagXOffset * xRatio flagYOffset = flagYOffset * yRatio end CreateActorImage("Team" .. teamIndex .. "Flag", xPos[1] - flagXOffset, yPos + flagYOffset, flagXSize, flagYSize, currentTeam.flag, 255, 255, 255, 255, "") CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "NameText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_LEFT, vertical = E_VALIGN_BOTTOM, x = xPos[1], y = yPos, text = currentTeam.fullName }) if (IsGroupMatchPlayed(matchIndex - 1, userGroup) == true) then CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "ScoreText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_BOTTOM, x = xPos[2], y = yPos, text = "" .. groupMatchProperties[2] }) CreateActor("Actor2DText", { name = "Team" .. (teamIndex + 1) .. "ScoreText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_LEFT, vertical = E_VALIGN_BOTTOM, x = xPos[4], y = yPos, text = "" .. groupMatchProperties[4] }) end CreateActor("Actor2DText", { name = "Match" .. matchIndex .. "DashText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_CENTER, vertical = E_VALIGN_BOTTOM, x = xPos[3], y = yPos, text = "-" }) teamIndex = teamIndex + 1 setCurrentTeam(groupMatchProperties[3]) -- defined in teams.lua CreateActor("Actor2DText", { name = "Team" .. teamIndex .. "NameText", scale = textSize, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, align = E_ALIGN_RIGHT, vertical = E_VALIGN_BOTTOM, x = xPos[5], y = yPos, text = "" .. currentTeam.fullName }) CreateActorImage("Team" .. teamIndex .. "Flag", xPos[5] + flagXOffset, yPos + flagYOffset, flagXSize, flagYSize, currentTeam.flag, 255, 255, 255, 255, "") if (callCount < 6) then EnqueueTimeExecuteScript("populateGroupMatches(" .. (callCount + 1) .. ")", 0.08) else groupButtonsActive = true end end --=============================================================================== function exitGroupMatches(functionName) for index = 1, 6 do if (IsUserGroupMatch(index - 1, userGroup) == true) then DestroyActor("UserTeamBar" .. index) end local teamIndex = (index - 1) * 2 DestroyActor("Team" .. teamIndex .. "Flag") DestroyActor("Team" .. teamIndex .. "NameText") if (IsGroupMatchPlayed(index - 1, userGroup) == true) then DestroyActor("Team" .. teamIndex .. "ScoreText") DestroyActor("Team" .. (teamIndex + 1) .. "ScoreText") end DestroyActor("Match" .. index .. "DashText") teamIndex = teamIndex + 1 DestroyActor("Team" .. teamIndex .. "NameText") DestroyActor("Team" .. teamIndex .. "Flag") end SetActorAnimPenalty("GroupMatches", { anim = "Screen_matches_out.anm", loop = false }) Sound.PlaySound(MenuSounds.Fx.panelOut, false) EnqueueExecuteScript("GroupMatches", "DestroyActor(\"GroupMatches\")") if (functionName ~= "") then EnqueueExecuteScript("GroupMatches", functionName) end end --=============================================================================== function exitGroup(functionName) StopMenuMusic(MenuSounds.Music.groups) if (currentScreen == SCREEN_GROUP_STANDINGS) then exitGroupResults("") else exitGroupMatches("") end musicStarted = false EnqueueExecuteScript("GroupButtons", "SetActorAnimPenalty(\"GroupButtons\", { anim = \"Screen_groupbuttons_out.anm\", loop = false })") EnqueueExecuteScript("GroupButtons", "DestroyActor(\"GroupButtons\")") EnqueueExecuteScript("GroupButtons", functionName) end --=============================================================================== function goToGroup() goToGroupMatches() shotsNumber = 5 end --=============================================================================== function getTreeText(index) if (index == 1) then return { scale = 0.1, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtExit } elseif (index == 2) then return { scale = 0.1, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtOk } elseif (index == 3) then return { scale = 0.1, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = txtWorldChallengeTitle } elseif (index == 4) then return { scale = 0.07, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = userMessage } end end --=============================================================================== function getNameText(index) if (index == 31) then if (roundsTeamsIds[index] == userTeamId) then return { name = "TeamNameText" .. index, scale = 0.08, font = "font5.fnt", overlap = -3, color = {255, 255, 255, 255}, vertical = E_VALIGN_CENTER, text = getTeamShortName(roundsTeamsIds[index]) } else return { name = "TeamNameText" .. index, scale = 0.08, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = getTeamFullName(roundsTeamsIds[index]) } end elseif (roundsTeamsIds[index] == userTeamId) then return { name = "TeamNameText" .. index, scale = 0.07, font = "font5.fnt", overlap = -3, color = {255, 255, 255, 255}, vertical = E_VALIGN_CENTER, text = getTeamShortName(roundsTeamsIds[index]) } else return { name = "TeamNameText" .. index, scale = 0.07, font = "font4.fnt", overlap = -3, color = {0, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = getTeamShortName(roundsTeamsIds[index]) } end end --=============================================================================== function getScoreText(index) if (roundsScores[index] == -1) then return { scale = 0.08, font = "font4.fnt", overlap = -3, color = {195, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = "" } else return { scale = 0.08, font = "font4.fnt", overlap = -3, color = {195, 0, 0, 255}, vertical = E_VALIGN_CENTER, text = "" .. roundsScores[index] } end end --=============================================================================== function goToFinalRounds() local roundFinished = true local matchesInRound = 16 local teamIndex = 1 local scoreIndex = 1 local userLastRound = 0 currentRound = 0 roundsTeamsIds = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 } roundsScores = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 } worldCupIsOver = false if (continueSimulation == true) then continueSimulation = false SimulateCPUMatches() SaveWorldCup() end while (roundFinished == true and matchesInRound > 1) do for index = 1, matchesInRound do -- at this point matchesInRound is actually the number of teams in this round roundsTeamsIds[teamIndex] = GetRoundTeamId(index - 1, currentRound) if (roundsTeamsIds[teamIndex] == userTeamId) then userLastRound = currentRound + 1 end teamIndex = teamIndex + 1 end roundFinished = IsRoundFinished(currentRound) matchesInRound = math.floor(matchesInRound / 2) for matchIndex = 1, matchesInRound do -- iterate through all the round's matches to get the scores if (IsRoundMatchPlayed(matchIndex - 1, currentRound) == true) then local roundMatchProperties = GetRoundMatch(matchIndex - 1, currentRound) roundsScores[scoreIndex] = roundMatchProperties[2] scoreIndex = scoreIndex + 1 roundsScores[scoreIndex] = roundMatchProperties[4] scoreIndex = scoreIndex + 1 end end currentRound = currentRound + 1 end currentRound = currentRound - 1 for matchIndex = 1, matchesInRound do local roundMatchProperties = GetRoundMatch(matchIndex - 1, currentRound) if (IsRoundMatchPlayed(matchIndex - 1, currentRound) == true) then -- add the winner to the teams names and ids if (roundMatchProperties[2] > roundMatchProperties[4]) then roundsTeamsIds[teamIndex] = roundMatchProperties[1] else roundsTeamsIds[teamIndex] = roundMatchProperties[3] end teamIndex = teamIndex + 1 else -- this should be the user match firstTeamId = roundMatchProperties[1] secondTeamId = roundMatchProperties[3] break end end musicStarted = false if (roundsTeamsIds[31] ~= -1) then -- the cup is over worldCupIsOver = true if (roundsTeamsIds[31] == userTeamId) then -- the user won musicStarted = true StartMenuMusic(MenuSounds.Music.winCup) userMessage = txtWinCup -- CreateActor("ActorGeom", {name = "WorldCup", model = "screen_cup_idle.mesh", touchable = false, camera = "backgroundCamera"}) -- SetActorAnimPenalty("WorldCup", {anim = "screen_cup_in.anm", loop = false }) else --see when the user was eliminated userMessage = txtsEliminations[userLastRound + 1] end else -- the cup is not over and the user wasn't eliminated (if he were, the rest of the matches would have been simulated and the cup would be over) userMessage = txtsQualifications[currentRound + 1] end if (musicStarted == false) then StartMenuMusic(MenuSounds.Music.rounds) end CreateActor("ActorGeom", {name = "FinalRounds", model = "Screen_tree.mesh", touchable = true, camera = "backgroundCamera"}) SetActorAnimPenalty("FinalRounds", { anim = "screen_tree_in.anm", loop = false }) Sound.PlaySound(MenuSounds.Fx.panelIn, false) for index = 1, 31 do if (roundsTeamsIds[index] ~= -1) then --set the team's flag setCurrentTeam(roundsTeamsIds[index]) SetTexture("FinalRounds", "" .. index, currentTeam.flag) else break end end allowBackButton = true end --=============================================================================== function exitFinalRounds(functionName) SetActorAnimPenalty("FinalRounds", { anim = "Screen_tree_out.anm", loop = false }) Sound.PlaySound(MenuSounds.Fx.panelOut, false) StopMenuMusic(MenuSounds.Music.rounds) if (IsWorldCupOver() == true) then DeleteSavedCup() StopMenuMusic(MenuSounds.Music.winCup) end -- if (ExistsActor("WorldCup")) then -- SetActorAnimPenalty("WorldCup", { anim = "screen_cup_out.anm", loop = false }) -- EnqueueExecuteScript("FinalRounds", "DestroyActor(\"WorldCup\")") -- end EnqueueExecuteScript("FinalRounds", "DestroyActor(\"FinalRounds\")") EnqueueExecuteScript("FinalRounds", functionName) end