Warcraft III resources & community, 2003–2006 · archived

Local Fade Filter

not rated
Submitted by Jukebox42Functions0 downloads
Lets you use a fade filter on a specific player. Hoep this helps someone.

To use:

LocalCinematicFade( FADETYPE, DURATION, STRING, RED%, GREEN%, BLUE%, TRANSPARENT%, PLAYER)

Source

function LocalCinematicFade takes integer fadetype, real duration, string tex, real red, real green, real blue, real trans, player toPlayer returns nothing
    if (GetLocalPlayer() == toPlayer) then
        if (fadetype == bj_CINEFADETYPE_FADEOUT) then
            // Fade out to the requested color.
            call AbortCinematicFadeBJ()
            call CinematicFadeCommonBJ(red, green, blue, duration, tex, 100, trans)
        elseif (fadetype == bj_CINEFADETYPE_FADEIN) then
            // Fade in from the requested color.
            call AbortCinematicFadeBJ()
            call CinematicFadeCommonBJ(red, green, blue, duration, tex, trans, 100)
            call FinishCinematicFadeAfterBJ(duration)
        elseif (fadetype == bj_CINEFADETYPE_FADEOUTIN) then
            // Fade out to the requested color, and then fade back in from it.
            if (duration > 0) then
                call AbortCinematicFadeBJ()
                call CinematicFadeCommonBJ(red, green, blue, duration * 0.5, tex, 100, trans)
                call ContinueCinematicFadeAfterBJ(duration * 0.5, red, green, blue, trans, tex)
                call FinishCinematicFadeAfterBJ(duration)
            endif
        else
            // Unrecognized fadetype - ignore the request.
        endif
    endif
endfunction

Comments

3
uuh, put it in the custom script section, then call it using a JASS ( custom script ) action

alternatively, use JASS, but seeing as you dont know how to implement this, im guessing that is out of the question :?
ok, i RLY need this, sum1 PLZ post here or PM me on how to implement this and use this in my map :!: :!: :!:
PLZ!
ty
few things

#1 - AbortCinematicFadeBJ can be replaced with its gutz, at it is a reasonably short function.

#2 - there is no point of leaving a hanging else ( with the Unrecognized fadetype thing ) in the code, as it just wastes space

#3 - ugh... extra brackets galore