function Trig_Submerge_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( OffsetLocation(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))]), GetRandomReal(-100.00, 100.00), GetRandomReal(-100.00, 100.00)), "Objects\\Spawnmodels\\Other\\IllidanFootprint\\IllidanWaterSpawnFootPrint.mdl" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Submerge_Func002C() ) then
call DisplayCineFilterBJ( true )
call StopSoundBJ( gg_snd_AboveWater1, true )
call StopSoundBJ( gg_snd_AboveWater2, true )
call StopSoundBJ( gg_snd_Wind, true )
call StopSoundBJ( gg_snd_War3XMainScreen, true )
call PlaySoundBJ( gg_snd_UnderWater1 )
call PlaySoundBJ( gg_snd_UnderWater2 )
call PlaySoundBJ( gg_snd_DullEcho )
else
endif
call SetCameraBoundsToRectForPlayerBJ( GetOwningPlayer(GetEnteringUnit()), gg_rct_Under_Water )
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))], PolarProjectionBJ(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))]), 15800.00, 270.50) )
call SetUnitTimeScalePercent( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))], 50.00 )
set udg_Submerged[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))] = true
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetEnteringUnit()), 'h00D'), function Trig_Submerge_Func009002 )
call SetPlayerAbilityAvailableBJ( false, 'A019', GetOwningPlayer(GetEnteringUnit()) )
call SetPlayerAbilityAvailableBJ( true, 'A017', GetOwningPlayer(GetEnteringUnit()) )
call RemoveUnit( GetEnteringUnit() )
if ( Trig_Submerge_Func014001() ) then
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))], OffsetLocation(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))]), 0, 400.00) )
else
call DoNothing( )
endif
if ( Trig_Submerge_Func015001() ) then
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))], OffsetLocation(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))]), 0, -800.00) )
else
call DoNothing( )
endif
if ( Trig_Submerge_Func016001() ) then
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))], OffsetLocation(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))]), 400.00, 400.00) )
else
call DoNothing( )
endif
if ( Trig_Submerge_Func017001() ) then
call SetUnitPositionLoc( udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))], OffsetLocation(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))]), -800.00, 0.00) )
else
call DoNothing( )
endif
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))]), 0 )
call TriggerSleepAction( 0.01 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( OffsetLocation(GetUnitLoc(udg_Hero[GetConvertedPlayerId(GetOwningPlayer(GetEnteringUnit()))]), GetRandomReal(-100.00, 100.00), GetRandomReal(-100.00, 100.00)), "Objects\\Spawnmodels\\Other\\IllidanFootprint\\IllidanWaterSpawnFootPrint.mdl" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction