Early days of creating a simple local fade filter and I'm new to Jass. I can save my map without compiling errors, but when the function is called in-game, Warcraft 3 crashes. Can someone help me work out why?
The function is called from a GUI trigger.
JASS:
function LocalFadeFilter takes player p , string texture , integer duration returns nothing
local timer delay = CreateTimer()
call BJDebugMsg("LocalFadeFilter called")
call TriggerSleepAction( 2 )
if GetLocalPlayer() == p then
call EnableUserUI(false)
call SetCineFilterTexture(texture)
call SetCineFilterBlendMode(BLEND_MODE_BLEND)
call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
call SetCineFilterStartUV(0, 0, 1, 1)
call SetCineFilterEndUV(0, 0, 1, 1)
call SetCineFilterStartColor(255, 255, 255, 255)
call SetCineFilterEndColor(255, 255, 255, 0)
call SetCineFilterDuration(duration)
call BJDebugMsg("Variables Set. Ready to Display Filter")
call TriggerSleepAction( 2 )
call DisplayCineFilter(true)
endif
//call TimerStart(delay, duration, false, function LocalFadeFilterContinued(p, filter, duration))
endfunction
The function is called from a GUI trigger.
-
FadeFilter Test
-
Events
-
Player - Player 1 (Red) types a chat message containing -fade as A substring
-
-
Conditions
-
Actions
-
Custom script: call LocalFadeFilter(GetTriggerPlayer() , "PalletTown.blp" , 3 )
-
-
JASS:
SetCineFilterTexMapFlags texmapflags whichFlags