Local player

Galdiuz

Creator of Photon Command
Reaction score
98
Hello, I'd like to create a fade filter for (Owner of (Picked Unit)) in GUI with help of custom scripts. How would i do this? I know it's something like this:

Trigger:
  • If local player = get owner of picked unit blablabla
    • then
    • Cinematic - Apply a filter over 2 seconds using Normal blending on texture White Mask, starting with color (100.00%, 100.00%, 100.00%) and 0.00% transparency and ending with color (100.00%, 100.00%, 100.00%) and 100.00% transparency
    • endif
 

Galdiuz

Creator of Photon Command
Reaction score
98
how would i check 'if local player is == (owner of (picked unit))' then?
 

Azlier

Old World Ghost
Reaction score
461
It'll desync. You need to use the Fade Filter natives manually. That GUI function desyncs if used locally.
 

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
JASS:
function CinematicFilterGenericForPlayer takes player whichPlayer, real duration, blendmode bmode, string tex, real red0, real green0, real blue0, real trans0, real red1, real green1, real blue1, real trans1 returns nothing
if ( GetLocalPlayer() == whichPlayer ) then
call SetCineFilterTexture(tex)
call SetCineFilterBlendMode(bmode)
call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
call SetCineFilterStartUV(0, 0, 1, 1)
call SetCineFilterEndUV(0, 0, 1, 1)
call SetCineFilterStartColor(PercentTo255(red0), PercentTo255(green0), PercentTo255(blue0), PercentTo255(100-trans0))
call SetCineFilterEndColor(PercentTo255(red1), PercentTo255(green1), PercentTo255(blue1), PercentTo255(100-trans1))
call SetCineFilterDuration(duration)
call DisplayCineFilter(true)
endif
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top