So after some trials and errors, I found out that GameTimeFrame is the reason crashing my map after the latest update.
Should I let this go? Or there could be maybe fixes for this?
Should I let this go? Or there could be maybe fixes for this?
JASS:
library GameTimeFrame initializer InitGTF
globals
framehandle gameTimeText = null
framehandle gameTimeIcon = null
string min = "0"
string sec = "0"
string time = "0"
endglobals
function UpdateGameTimeFrame takes nothing returns nothing
set sec = "0"
set min = "0"
if udg_Game_Time_Seconds >= 10 then
set sec = ""
endif
if udg_Game_Time_Minutes >= 10 then
set min = ""
endif
set time = min + I2S(udg_Game_Time_Minutes) + ":" + sec + I2S(udg_Game_Time_Seconds)
call BlzFrameSetText(gameTimeText, time)
endfunction
function CreateGameTimeFrame takes nothing returns nothing
local framehandle fh = BlzGetFrameByName("ResourceBarUpkeepText", 0)
call BlzFrameClearAllPoints(fh)
call BlzFrameSetAbsPoint(fh, FRAMEPOINT_CENTER, 3, 3)
call BlzFrameSetScale(fh, 0.001)
set gameTimeIcon = BlzCreateSimpleFrame("GTFTexture", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0)
call BlzFrameSetTexture(BlzGetFrameByName("GTFTextureValue", 0), "ReplaceableTextures\\PassiveButtons\\PASBTNEngineeringUpgrade.blp", 0, true)
call BlzFrameSetAbsPoint(gameTimeIcon, FRAMEPOINT_CENTER, 0.731, 0.589)
call BlzFrameSetSize(gameTimeIcon, 0.016, 0.016)
call BlzFrameSetLevel(gameTimeIcon, 1)
set gameTimeText = BlzCreateFrame("GTFText", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0, 0)
call BlzFrameSetAbsPoint(gameTimeText, FRAMEPOINT_CENTER, 0.779, 0.589)
call BlzFrameSetText(gameTimeText, "00:00")
call BlzFrameSetLevel(gameTimeText, 1)
set fh = null
endfunction
function InitGTF takes nothing returns nothing
call BlzLoadTOCFile("war3mapimported\\GTF.toc")
call CreateGameTimeFrame()
endfunction
endlibrary
-
Game Time Frame
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet Game_Time_Seconds = (Game_Time_Seconds + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Game_Time_Seconds Equal to 60
-
-
Then - Actions
-
Set VariableSet Game_Time_Seconds = 0
-
Set VariableSet Game_Time_Minutes = (Game_Time_Minutes + 1)
-
-
Else - Actions
-
-
Custom script: call UpdateGameTimeFrame()
-
-