Basically, hero dies... screen fades to black over 10 seconds. Hero respawns. (Camera is attached to hero so no need to pan to new location). Screen fades in over 2 seconds.
I know I can change it by " ( GetLocalPlayer() == whichPlayer )", but I'm not sure which part to change, and I don't know how to set the duration of fade, and where to set the faded type.
Thanks for taking the time to read this. :3
-
Respawn Blue
-
Events
- Unit - A unit Dies
-
Conditions
- (Owner of (Triggering unit)) Equal to Player 2 (Blue)
- ((Triggering unit) is A Hero) Equal to True
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Dying unit) is A Hero) Equal to True
-
Then - Actions
- Cinematic - Fade out over 10.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Wait 10.00 seconds
- Hero - Instantly revive (Dying unit) at (Center of Respawn Point <gen>), Show revival graphics
- Cinematic - Fade in over 4.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
JASS:
function Trig_Respawn_Red_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Respawn_Red_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Respawn_Red_Actions 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 ( Trig_Respawn_Red_Func001C() ) then
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
call TriggerSleepAction( 10.00 )
call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(gg_rct_Respawn_Point), true )
else
endif
endfunction
//===========================================================================
function InitTrig_Respawn_Red takes nothing returns nothing
set gg_trg_Respawn_Red = CreateTrigger( )
call DisableTrigger( gg_trg_Respawn_Red )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Respawn_Red, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Respawn_Red, Condition( function Trig_Respawn_Red_Conditions ) )
call TriggerAddAction( gg_trg_Respawn_Red, function Trig_Respawn_Red_Actions )
endfunction
I know I can change it by " ( GetLocalPlayer() == whichPlayer )", but I'm not sure which part to change, and I don't know how to set the duration of fade, and where to set the faded type.
Thanks for taking the time to read this. :3