//TESH.scrollpos=0
//TESH.alwaysfold=0
Name | Type | is_array | initial_value |
Act_Num | integer | No | 1 |
CenterPoint | location | No | |
DH | unit | No | |
DH_SpinSpeed | real | No | |
DHy | unit | No | |
DoFade | boolean | Yes | |
Fog_Green | real | No | 128.00 |
Fog_Red | real | No | 128.00 |
Func_Num | integer | No | |
hfoo_Red | real | No | 100.00 |
hfooFadeHandler | real | No | 0.00 |
IsInFade | boolean | No | |
IsUnitBeingKnockedBack | boolean | Yes | |
JD_Angle | real | Yes | |
JD_Distances | real | Yes | |
JD_Group | group | No | |
JD_HighSettings | real | Yes | |
JD_Integers | integer | Yes | |
JD_JumpHigh | real | Yes | |
JD_ReachedDistance | real | Yes | |
JD_RealTimer | real | Yes | |
JD_SpeedUnits | real | Yes | |
JD_TempPoint | location | Yes | |
JD_TreesDestroy | boolean | Yes | |
JD_Unit | unit | Yes | |
JDA_DestroyTrees_Dash | boolean | No | |
JDA_JumpHigh_Distance | real | No | |
JDA_Speed | real | No | |
JDA_TargetPoint | location | No | |
JDA_Unit | unit | No | |
K | unit | Yes | |
K2DAmphibious | boolean | Yes | |
K2DAngle | real | Yes | |
K2DBounce | boolean | Yes | |
K2DCollision | real | Yes | |
K2DCos | real | Yes | |
K2DCosD1 | real | Yes | |
K2DCosD2 | real | Yes | |
K2DCosH | real | Yes | |
K2DDebrisKiller | unit | No | |
K2DFreeze | boolean | Yes | |
K2DFriction | real | Yes | |
K2DFXModel | string | Yes | |
K2DFXRate | real | Yes | |
K2DFXTimeLeft | real | Yes | |
K2DHeight | real | Yes | |
K2DHeightThreshold | real | Yes | |
K2DImpact | trigger | Yes | |
K2DItem | item | No | |
K2DItemOffset | boolean | No | |
K2DItemsFound | boolean | No | |
K2DKillTrees | boolean | Yes | |
K2DLastX | real | Yes | |
K2DLastY | real | Yes | |
K2DMaxX | real | No | |
K2DMaxY | real | No | |
K2DMinX | real | No | |
K2DMinY | real | No | |
K2DNext | integer | Yes | |
K2DOverride | boolean | Yes | |
K2DPause | boolean | Yes | |
K2DPrev | integer | Yes | |
K2DRadius | integer | Yes | |
K2DRegion | rect | No | |
K2DSimple | boolean | Yes | |
K2DSin | real | Yes | |
K2DSinD1 | real | Yes | |
K2DSinD2 | real | Yes | |
K2DSinH | real | Yes | |
K2DSource | unit | Yes | |
K2DTimeLeft | real | Yes | |
K2DTimeout | real | No | |
K2DTimer | timer | No | |
K2DVelocity | real | Yes | |
K2DX | real | No | |
K2DY | real | No | |
Knockback2DAmphibious | boolean | No | |
Knockback2DAngle | real | No | |
Knockback2DBounces | boolean | No | |
Knockback2DCollision | real | No | |
Knockback2DDefaultBounce | boolean | No | |
Knockback2DDefaultFriction | real | No | |
Knockback2DDefaultFX | string | No | |
Knockback2DDefaultFXRate | real | No | |
Knockback2DDefaultGravity | real | No | |
Knockback2DDefaultKillTrees | boolean | No | |
Knockback2DDefaultPause | boolean | No | |
Knockback2DDistance | real | No | |
Knockback2DFriction | real | No | |
Knockback2DFXRate | real | No | |
Knockback2DGravity | real | No | |
Knockback2DHeight | real | No | |
Knockback2DKillTrees | boolean | No | |
Knockback2DLoopFX | string | No | |
Knockback2DOnImpact | trigger | No | |
Knockback2DOverride | boolean | No | |
Knockback2DPause | boolean | No | |
Knockback2DRobustPathing | integer | No | |
Knockback2DSimple | boolean | No | |
Knockback2DSource | unit | No | |
Knockback2DTime | real | No | |
Knockback2DTreeOrDebris | string | No | |
Knockback2DUnit | unit | No | |
LeaklessGroup | group | No | |
LookDum | unit | Yes | |
LookDum_Int | integer | No | |
LoopInt | integer | No | |
Radians_QuarterPi | real | No | |
Radians_QuarterTurn | real | No | |
Radians_Turn | real | No | |
S_ModEnv | string | No | |
S_ModOth | string | No | |
S_Sys | string | No | |
S_Tex | string | No | |
ShapePoint | location | Yes | |
Slide_i | integer | No | |
Slide_r | real | Yes | |
Slide_u | unit | Yes | |
TempI | integer | No | |
TempReal | real | No | |
TempUnit | unit | No | |
TempX | real | No | |
TempY | real | No | |
Time | real | No | |
UDex | integer | No | |
UDexGen | integer | No | |
UDexNext | integer | Yes | |
UDexPrev | integer | Yes | |
UDexRecycle | integer | No | |
UDexUnits | unit | Yes | |
UDexWasted | integer | No | |
UnitIndexerEnabled | boolean | No | |
UnitIndexEvent | real | No | |
VM | unit | No | |
VM_Trans | real | No |
//TESH.scrollpos=3
//TESH.alwaysfold=0
library Cinematic uses Cinema, MySnippets
function Act1F132 takes nothing returns nothing
call CustomVictoryBJ( Player(0), false, false )
endfunction
function Act1F131 takes nothing returns nothing
call CreateCreditText("|cFF959697Special thanks to:\n|r|cFFFF0000The Hive Workshop\nBlizzard Entertainment\nBribe\nAnitraf and iNfraNe|r" ,10)
call Wait(6)
endfunction
function Act1F130 takes nothing returns nothing
call CreateCreditText("|cFF959697Textures by |r|cFFFF0000Xezko, Radicool, Stanakin, shockwave and olyvian|r" ,10)
call Wait(2)
endfunction
function Act1F129 takes nothing returns nothing
call CreateCreditText("|cFF959697Models by |r|cFFFF0000Thrikodius, HateCrew, Graber, Tobyfat50, WILL THE ALMIGHTY, Aquis, Felipe Gormadoc, Tavalaj, UTM, B2M and ikillforeyou|r" ,10)
call Wait(1)
endfunction
function Act1F128 takes nothing returns nothing
call CreateCreditText("|cFF959697Music by |r|cFFFF0000Blizzard Entertainment |r|cFF959697and |r|cFFFF0000incompetech.com|r" ,12)
call Wait(1)
endfunction
function Act1F127 takes nothing returns nothing
call CreateCreditText("|cFF959697Made by |r|cFFFF0000Arad MNK|r" ,18)
call Wait(2)
endfunction
function Act1F126 takes nothing returns nothing
call SetSkyModel("war3mapImported\\MoonySky.mdx")
call CameraSetupApplyForceDuration(gg_cam_End, true, 0)
call SetFloatGameState(GAME_STATE_TIME_OF_DAY, 12)
call RemoveWeatherEffect(bj_lastCreatedWeatherEffect)
set bj_lastCreatedWeatherEffect = AddWeatherEffect(bj_mapInitialPlayableArea, 'LRma')
call EnableWeatherEffect(bj_lastCreatedWeatherEffect, true)
call CreateCreditText("|cFFFF0000Blade and Blood|r\n|cFF959697============|r" ,18)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F125 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 4, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F124 takes nothing returns nothing
call Talk("Revenge, has been done.", 4, gg_snd_Jack16)
call Wait(4)
endfunction
function Act1F123 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_139, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_140, true, 8)
call SetUnitPositionLoc(udg_DH, GetRectCenter(gg_rct_32))
call SetUnitFacing(udg_DH, 270)
call SetUnitAnimationByIndex(udg_DH, 7)
call SetUnitTimeScale(udg_DH, 0.7)
set bj_lastCreatedWeatherEffect = AddWeatherEffect(bj_mapInitialPlayableArea, 'LRaa')
call EnableWeatherEffect(bj_lastCreatedWeatherEffect, true)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F122 takes nothing returns nothing
local integer i = 1
local unit u
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl", udg_VM, "origin")
call CreateEqualShape(GetUnitLoc(udg_VM), 64, 20)
loop
exitwhen i > 20
set u = CreateUnitAtLoc(Player(0), 'n000', udg_ShapePoint[i], 270)
call SetUnitFlyHeight(u, 512, 0)
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl", u, "origin")
set i = i + 1
endloop
call SetUnitAnimationByIndex(udg_VM, 2)
call Wait(1)
endfunction
function Act1F121 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl", udg_VM, "origin")
call Wait(1)
endfunction
function Act1F120 takes nothing returns nothing
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl", udg_VM, "origin")
call Wait(1)
endfunction
function Act1F119 takes nothing returns nothing
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl", udg_VM, "origin")
call SetUnitAnimationByIndex(udg_VM, 7)
set udg_VM = CreateUnitAtLoc(Player(0), 'n004', GetUnitLoc(udg_VM), 270)
call SetUnitFlyHeight(udg_VM, 512, 0)
call Wait(1)
endfunction
function No takes nothing returns nothing
call Talk("NOOOOOOOOOOOOOOOOOOOOOO!", 4, gg_snd_Vampire2)
endfunction
function Act1F118 takes nothing returns nothing
set udg_Knockback2DAngle = 90
set udg_Knockback2DTime = 4
set udg_Knockback2DDistance = 512
set udg_Knockback2DUnit = udg_VM
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call StartSound(gg_snd_HeroDreadLordDeath)
call StartSound(gg_snd_HeroDreadLordDeathRev)
call CameraSetupApplyForceDuration(gg_cam_Cam_137, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_138, true, 8)
set bj_lastCreatedEffect = AddSpecialEffectTarget("Doodads\\Cinematic\\FireRockSmall\\FireRockSmall.mdl", udg_VM, "origin")
call SetUnitTimeScale(udg_VM, 0.3)
call SetUnitAnimationByIndex(udg_VM, 3)
call SetUnitFlyHeight(udg_VM, 512, 128)
call WaitCus(2, function No)
call Wait(4)
endfunction
function Act1F117 takes nothing returns nothing
set udg_DoFade[5] = true
call SetSkyModel("Environment\\Sky\\LordaeronSummerSky\\LordaeronSummerSky.mdl")
call RemoveWeatherEffect(bj_lastCreatedWeatherEffect)
call SetFloatGameState(GAME_STATE_TIME_OF_DAY, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_135, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_136, true, 4)
call SetUnitFlyHeight(gg_unit_n006_0027, 32, 8)
call Wait(4)
endfunction
function Act1F116 takes nothing returns nothing
call Talk("Each time you hit me, I regenerate.", 4, gg_snd_Vampire1)
call SetUnitFacingToFaceUnitTimed(udg_VM, udg_DH, 0.5)
call Wait(4)
endfunction
function Act1F115 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_134, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_133, true, 6)
call Wait(2)
endfunction
function Act1F114 takes nothing returns nothing
call StartSound(gg_snd_MetalHeavySliceFlesh2)
call CameraSetupApplyForceDuration(gg_cam_Cam_131, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_132, true, 4)
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl", udg_VM, "origin")
call Wait(4)
endfunction
function Act1F113 takes nothing returns nothing
call slide(udg_VM, 512, 8, GetRectCenter(gg_rct_31))
call KillUnit(bj_lastCreatedUnit)
call SetUnitTimeScale(udg_DH, 0.1)
call SetUnitAnimationByIndex(udg_DH, 3)
call SetUnitTimeScale(udg_VM, 0.1)
call SetUnitAnimationByIndex(udg_VM, 9)
call slide(udg_DH, 512, 8, GetRectCenter(gg_rct_30))
call CameraSetupApplyForceDuration(gg_cam_Cam_127, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_128, true, 2)
call Wait(2)
endfunction
function Act1F112 takes nothing returns nothing
call SetUnitTimeScale(udg_DH, 0.5)
call SetUnitAnimationByIndex(udg_DH, 9)
call Wait(1)
endfunction
function Act1F111 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_125, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_126, true, 2)
call Wait(2)
endfunction
function Act1F110 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_123, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_124, true, 4)
call SetUnitFacingToFaceUnitTimed(udg_DH, udg_VM, 1)
call SetUnitPositionLoc(udg_DH, GetRectCenter(gg_rct_31))
call SetUnitFlyHeight(udg_DH, 1536, 0)
call SetUnitFlyHeight(udg_DH, 0, 256)
call Wait(4)
endfunction
function Act1F109 takes nothing returns nothing
set bj_lastCreatedUnit = CreateUnitAtLoc(Player(0), 'n005', GetUnitLoc(udg_VM), 270)
call SetUnitAnimationByIndex(udg_VM, 3)
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl", udg_VM, "origin")
call Wait(1)
endfunction
function Act1F108 takes nothing returns nothing
call SetUnitPositionLoc(udg_VM, GetRectCenter(gg_rct_30))
call CameraSetupApplyForceDuration(gg_cam_Cam_121, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_122, true, 4)
call SetUnitFlyHeight(udg_VM, 1536, 0)
call SetUnitFlyHeight(udg_VM, 0, 384)
call Wait(4)
endfunction
function Act1F107 takes nothing returns nothing
call StartSound(gg_snd_Vampire_Roar)
call SetUnitTimeScale(udg_VM, 0.5)
call SetUnitAnimationByIndex(udg_VM, 3)
call DestroyEffect(bj_lastCreatedEffect)
call Wait(1)
endfunction
function Act1F106 takes nothing returns nothing
call StartSound(gg_snd_MetalLightSliceFlesh)
call SetUnitFlyHeight(udg_DH, 0, 170)
call SetUnitFlyHeight(udg_VM, 0, 192)
call SetUnitAnimationByIndex(udg_VM, 9)
call SetUnitAnimationByIndex(udg_DH, 13)
call SetUnitTimeScale(udg_DH, 0.6)
set udg_Knockback2DAngle = 45
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = 300
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Other\\BeastmasterBlood\\BeastmasterBlood.mdl", udg_VM, "origin")
call Wait(1)
endfunction
function Act1F105 takes nothing returns nothing
set udg_DoFade[4] = false
call CameraSetupApplyForceDuration(gg_cam_Cam_119, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_120, true, 4)
call SetUnitFlyHeight(udg_DH, 0, 0)
call SetUnitFlyHeight(udg_DH, 340, 340)
call SetUnitTimeScale(udg_DH, 0.5)
call SetUnitAnimationByIndex(udg_DH, 10)
call SetUnitFacing(udg_DH, 90)
call SetUnitPositionLoc(udg_DH, PolarProjectionBJ(GetUnitLoc(udg_VM), 48, 180))
call Wait(1)
endfunction
function Act1F104 takes nothing returns nothing
set udg_DoFade[4] = true
call ResetUnitLookAt(udg_DH)
call SetUnitAnimationByIndex(udg_DH, 13)
call SetUnitFlyHeight(udg_DH, 1024, 256)
call Wait(4)
endfunction
function Act1F103 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_117, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_118, true, 6)
call Wait(2)
endfunction
function Act1F102 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_115, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_116, true, 4)
call SetUnitTimeScale(udg_VM, 0.5)
call SetUnitAnimationByIndex(udg_VM, 3)
call SetUnitPositionLoc(udg_VM, GetRectCenter(gg_rct_29))
call SetUnitFacing(udg_DH, 90)
call SetUnitFlyHeight(udg_VM, 384, 192)
call Wait(4)
endfunction
function Act1F101 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_113, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_114, true, 4)
call Look(udg_DH, GetLocationX(GetUnitLoc(gg_unit_hfoo_0013)), GetLocationY(GetUnitLoc(gg_unit_hfoo_0013)), 0, GetLocationX(GetUnitLoc(gg_unit_hfoo_0013)), GetLocationY(GetUnitLoc(gg_unit_hfoo_0013)), 1536, 4)
call Wait(4)
endfunction
function Act1F100 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_111, true, 2)
call StartSound(gg_snd_MetalHeavySliceFlesh)
call SetUnitTimeScale(gg_unit_hfoo_0013, 0.8)
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 9)
call SetUnitTimeScale(udg_DH, 0.8)
call SetUnitAnimationByIndex(udg_DH, 9)
call Wait(2)
endfunction
function Act1F99 takes nothing returns nothing
call SetUnitTimeScale(udg_DH, 1)
call CameraSetupApplyForceDuration(gg_cam_Cam_110, true, 0.3)
call Wait(0.2)
endfunction
function Act1F98 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEIN, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call SetUnitTimeScale(gg_unit_hfoo_0013, 0.05)
call SetUnitTimeScale(udg_DH, 0.05)
call CameraSetupApplyForceDuration(gg_cam_Cam_109, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_110, true, 2)
call SetUnitFacing(udg_DH, GetUnitFacing(udg_DH) + 30)
call Wait(2)
endfunction
function Act1F97 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F96DoAnim takes nothing returns nothing
call SetUnitTimeScale(udg_DH, 0.12)
call SetUnitAnimationByIndex(udg_DH, 8)
endfunction
function Act1F96 takes nothing returns nothing
local location l1 = GetUnitLoc(udg_K[1])
local location l2 = GetUnitLoc(udg_K[2])
call ShowUnit(udg_K[1], false)
call ShowUnit(udg_K[2], false)
set udg_K[1] = CreateUnitAtLoc(Player(1), 'H000', l1, GetUnitFacing(udg_K[1]))
set udg_K[2] = CreateUnitAtLoc(Player(1), 'hfoo', l2, GetUnitFacing(udg_K[2]))
call CinematicFade(bj_CINEFADETYPE_FADEIN, 0.5, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2.5)
call WaitCus(1.5, function Act1F96DoAnim)
call RemoveLocation(l1)
set l1 = null
call RemoveLocation(l2)
set l2 = null
endfunction
function Act1F95 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 0.5, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(0.5)
endfunction
function Act1F94 takes nothing returns nothing
local location l1 = GetUnitLoc(udg_K[1])
local location l2 = GetUnitLoc(udg_K[2])
call ShowUnit(udg_K[1], false)
call ShowUnit(udg_K[2], false)
set udg_K[1] = CreateUnitAtLoc(Player(0), 'H002', l1, GetUnitFacing(udg_K[1]))
call SetUnitScale(udg_K[1], 1.3, 1.3, 1.3)
set udg_K[2] = CreateUnitAtLoc(Player(0), 'nvl2', l2, GetUnitFacing(udg_K[2]))
call CinematicFade(bj_CINEFADETYPE_FADEIN, 0.5, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2.5)
call RemoveLocation(l1)
set l1 = null
call RemoveLocation(l2)
set l2 = null
endfunction
function Act1F93 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 0.5, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(0.5)
endfunction
function Act1F92 takes nothing returns nothing
call SetUnitFacingToFaceUnitTimed(udg_K[1], udg_K[2], 0.5)
call SetUnitFacingToFaceUnitTimed(udg_K[2], udg_K[1], 0.5)
call CameraSetupApplyForceDuration(gg_cam_Cam_107, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_108, true, 2)
call SetUnitAnimationByIndex(udg_K[1], 0)
call SetUnitAnimationByIndex(udg_K[2], 1)
call Wait(2)
endfunction
function Act1F91 takes nothing returns nothing
call SetUnitTimeScale(udg_DH, 0)
call SetUnitFacing(udg_K[1], AngleBetweenPoints(GetUnitLoc(udg_K[1]), GetRectCenter(gg_rct_27)))
call SetUnitFacing(udg_K[2], AngleBetweenPoints(GetUnitLoc(udg_K[2]), GetRectCenter(gg_rct_28)))
call SetUnitTimeScale(udg_DH, 0)
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(udg_K[1]), GetRectCenter(gg_rct_27))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = DistanceBetweenPoints(GetUnitLoc(udg_K[1]), GetRectCenter(gg_rct_27)) / 2
set udg_Knockback2DUnit = udg_K[1]
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
/*Clean Line Break*/
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(udg_K[2]), GetRectCenter(gg_rct_28))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = DistanceBetweenPoints(GetUnitLoc(udg_K[2]), GetRectCenter(gg_rct_28)) / 2
set udg_Knockback2DUnit = udg_K[2]
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call CameraSetupApplyForceDuration(gg_cam_Cam_105, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_106, true, 2)
call SetUnitAnimationByIndex(udg_K[1], 6)
call SetUnitAnimationByIndex(udg_K[2], 0)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F90 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F89 takes nothing returns nothing
call SetUnitTimeScale(udg_DH, 0.2)
call SetUnitTimeScale(gg_unit_hfoo_0013, 0.1)
call SetUnitAnimationByIndex(udg_DH, 8)
call SetUnitFacingToFaceUnitTimed(gg_unit_hfoo_0013, udg_DH, 3)
call CameraSetupApplyForceDuration(gg_cam_Cam_103, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_104, true, 3)
call Wait(1)
endfunction
function Act1F88SetDHface takes nothing returns nothing
call SetUnitFacingToFaceUnitTimed(udg_DH, gg_unit_hfoo_0013, 0.4)
endfunction
function Act1F88 takes nothing returns nothing
call StartSound(gg_snd_MetalHeavySliceMetal)
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 11)
call SetUnitAnimationByIndex(udg_DH, 3)
call slide(udg_DH, 128, 1, PolarProjectionBJ(GetUnitLoc(gg_unit_hfoo_0013), 56, GetUnitFacing(gg_unit_hfoo_0013) + 180))
call Wait(1)
call WaitCus(0.8, function Act1F88SetDHface)
endfunction
function Act1F87 takes nothing returns nothing
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 7)
call SetUnitFacing(gg_unit_hfoo_0013, GetUnitFacing(gg_unit_hfoo_0013) - 20)
call SetUnitAnimationByIndex(udg_DH, 2)
call Wait(0.8)
endfunction
function Act1F86 takes nothing returns nothing
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 5)
call CameraSetupApplyForceDuration(gg_cam_Cam_101, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_102, true, 2.6)
call Wait(0.8)
endfunction
function Act1F85 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_99, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_100, true, 2)
call Wait(2)
endfunction
function Act1F84 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_98, true, 2)
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 0)
call SetUnitAnimationByIndex(udg_DH, 9)
call Wait(2)
endfunction
function Act1F83 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_96, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_97, true, 2)
call SetUnitAnimationByIndex(udg_DH, 6)
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(udg_DH), GetUnitLoc(gg_unit_hfoo_0013))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = DistanceBetweenPoints(GetUnitLoc(udg_DH), PolarProjectionBJ(GetUnitLoc(gg_unit_hfoo_0013), 112, GetUnitFacing(gg_unit_hfoo_0013))) / 2
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitFacing(udg_DH, AngleBetweenPoints(GetUnitLoc(udg_DH), GetUnitLoc(gg_unit_hfoo_0013)))
call Wait(2)
endfunction
function Act1F82 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_94, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_95, true, 2)
call SetUnitVertexColorBJ(gg_unit_hfoo_0013, 50, 10, 10, 0)
set udg_hfoo_Red = 50
call hfooFade()
call SetUnitTimeScale(udg_DH, 0.5)
call SetUnitTimeScale(gg_unit_hfoo_0013, 0.5)
call SetUnitAnimationByIndex(udg_DH, 6)
call SetUnitAnimationByIndex(udg_VM, 7)
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 9)
call SetUnitFacing(udg_DH, AngleBetweenPoints(GetUnitLoc(udg_DH), GetRectCenter(gg_rct_26)))
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(udg_DH), GetRectCenter(gg_rct_26))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = DistanceBetweenPoints(GetUnitLoc(udg_DH), GetRectCenter(gg_rct_26)) / 2
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call Wait(2)
endfunction
function Act1F81 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEIN, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call SetUnitTimeScale(udg_DH, 1)
call SetUnitAnimationByIndex(udg_DH, 9)
call CameraSetupApplyForceDuration(gg_cam_Cam_92, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_93, true, 2)
call SetUnitAnimationByIndex(udg_VM, 1)
call SetUnitFacing(udg_DH, 200)
call Wait(2)
endfunction
function Act1F80 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(1)
endfunction
function Act1F79 takes nothing returns nothing
local unit u = ReplaceUnitBJ(gg_unit_H002_0023, 'nhef', 1)
call CameraSetupApplyForceDuration(gg_cam_Cam_90, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_91, true, 4)
call SetUnitLookAt(u, "bone_head", gg_unit_n000_0028, 0, 0, 0)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(3)
endfunction
function Act1F78 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(1)
endfunction
function Act1F77 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_88, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_89, true, 4)
call SetUnitAnimationByIndex(udg_VM, 9)
call StartSound(gg_snd_Death)
call Wait(3)
endfunction
function Act1F76 takes nothing returns nothing
set udg_Knockback2DAngle = 30
set udg_Knockback2DTime = 0.5
set udg_Knockback2DDistance = 200
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
/*Line Break*/
set udg_Knockback2DAngle = 240
set udg_Knockback2DTime = 1
set udg_Knockback2DDistance = 64
set udg_Knockback2DUnit = udg_VM
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitTimeScale(udg_DH, 1.5)
call SetUnitAnimationByIndex(udg_DH, 5)
call SetUnitAnimationByIndex(udg_VM, 5)
call CameraSetupApplyForceDuration(gg_cam_Cam_86, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_87, true, 2)
call Wait(1)
endfunction
function Act1F75 takes nothing returns nothing
call SetUnitTimeScale(udg_VM, 0.5)
call SetUnitTimeScale(udg_DH, 1)
call SetUnitAnimationByIndex(udg_VM, 9)
call SetUnitAnimationByIndex(udg_DH, 9)
call SetUnitFacing(udg_VM, 270)
call SetUnitPositionLoc(udg_VM, PolarProjectionBJ(GetUnitLoc(udg_DH), 64, 90))
call SetUnitFlyHeight(udg_VM, 512, 0)
call SetUnitFlyHeight(udg_VM, 0, 512)
call CameraSetupApplyForceDuration(gg_cam_Cam_85, true, 0)
call Wait(1)
endfunction
function Act1F74 takes nothing returns nothing
call SetUnitTimeScale(gg_unit_hfoo_0013, 0)
call SetUnitVertexColorBJ(gg_unit_hfoo_0013, 100, 50, 50, 0)
call SetUnitAnimationByIndex(udg_DH, 8)
call ResetUnitLookAt(udg_DH)
call SetUnitAnimationByIndex(udg_VM, 7)
call Wait(1)
endfunction
function Act1F73 takes nothing returns nothing
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitAnimationByIndex(udg_VM, 6)
call SetUnitTimeScale(udg_VM, 2)
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 7)
call CameraSetupApplyForceDuration(gg_cam_Cam_84, true, 0)
call Wait(1)
endfunction
function Act1F72 takes nothing returns nothing
call StartSound(gg_snd_MetalMediumSliceFlesh)
call SetUnitFacingToFaceUnitTimed(udg_VM, gg_unit_hfoo_0013, 0.5)
call ResetUnitLookAt(udg_VM)
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(udg_DH), GetUnitLoc(udg_VM))
set udg_Knockback2DTime = 1.5
set udg_Knockback2DDistance = (DistanceBetweenPoints(GetUnitLoc(udg_DH), GetUnitLoc(udg_VM)) / 2) - 64
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitAnimationByIndex(udg_DH, 6)
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Other\\BeastmasterBlood\\BeastmasterBlood.mdl", udg_VM, "origin")
call Wait(0.5)
endfunction
function Act1F71 takes nothing returns nothing
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 5)
call CameraSetupApplyForceDuration(gg_cam_Cam_83, true, 1)
call Wait(0.5)
endfunction
function Act1F70 takes nothing returns nothing
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_82, true, 1)
call Wait(1)
endfunction
function Act1F69 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_81, true, 0)
call Wait(1)
endfunction
function Act1F68 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEIN, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_80, true, 0)
call SetUnitFacingToFaceUnitTimed(udg_DH, udg_VM, 0)
call SetUnitTimeScale(udg_VM, 1)
call SetUnitAnimationByIndex(udg_VM, 1)
call SetUnitLookAt(udg_DH, "bone_head", udg_VM, 0, 0, 120)
call SetUnitLookAt(udg_VM, "bone_head", udg_DH, 0, 0, 90)
call Wait(3)
endfunction
function Act1F67Fade takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
endfunction
function Act1F67 takes nothing returns nothing
call WaitCus(1, function Act1F67Fade)
call CameraSetupApplyForceDuration(gg_cam_Cam_79, true, 0)
call Wait(2)
endfunction
function Act1F66 takes nothing returns nothing
call Talk("I'll help you have your revenge, brother.", 5, gg_snd_Brother3)
call CameraSetupApplyForceDuration(gg_cam_Cam_78, true, 0)
call Wait(3)
endfunction
function Act1F65 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_77, true, 2)
call Wait(2)
endfunction
function Act1F64 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_75, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_76, true, 4)
call SetUnitAnimationByIndex(gg_unit_H002_0023, 0)
call SetUnitAnimationByIndex(gg_unit_hfoo_0024, 0)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F63Fade takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
endfunction
function Act1F63 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_74, true, 0)
call SetUnitFlyHeight(udg_VM, 256, 0)
call SetUnitFlyHeight(udg_VM, 0, 512)
call SetUnitVertexColorBJ(udg_DH, 100, 100, 100, 0)
call KillUnit(bj_lastCreatedUnit)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 0, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 100)
call WaitCus(0.01, function Act1F63Fade)
call Wait(1)
endfunction
function Act1F62 takes nothing returns nothing
local real r = 4
call CameraSetupApplyForceDuration(gg_cam_Cam_72, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_73, true, r)
call SetUnitTimeScale(udg_VM, 0.4)
call SetUnitAnimationByIndex(udg_VM, 3)
call SetUnitVertexColorBJ(udg_DH, 80, 0, 0, 70)
set bj_lastCreatedUnit = CreateUnitAtLoc(Player(0), 'n004', GetUnitLoc(udg_DH), 270)
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 0.1, "ReplaceableTextures\\CameraMasks\\DreamFilter_Mask.blp", 80, 0, 0, 50)
call Wait(r)
endfunction
function Act1F61 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_71, true, 0)
call SetUnitAnimationByIndex(udg_DH, 9)
call SetUnitFlyHeight(udg_VM, 2048, 0)
call SetUnitTimeScale(udg_VM, 0.5)
call SetUnitAnimationByIndex(udg_VM, 7)
call SetUnitPositionLoc(udg_VM, GetRectCenter(gg_rct_24))
call SetUnitFacingToFaceUnitTimed(udg_VM, udg_DH, 0)
call Wait(1)
endfunction
function Act1F60 takes nothing returns nothing
call StartSound(gg_snd_MetalLightChopWood)
call SetUnitFlyHeight(gg_unit_n003_0022, 0, 96)
set udg_Knockback2DAngle = 200
set udg_Knockback2DTime = 0.25
set udg_Knockback2DDistance = 96
set udg_Knockback2DUnit = gg_unit_n003_0022
set udg_Knockback2DCollision = -1
set udg_Knockback2DFriction = 1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
set bj_lastCreatedEffect = AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", gg_unit_n003_0022, "origin")
call Wait(1.2)
endfunction
function Act1F59 takes nothing returns nothing
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(udg_VM), GetUnitLoc(udg_DH))
set udg_Knockback2DTime = 1.2
set udg_Knockback2DDistance = (DistanceBetweenPoints(GetUnitLoc(udg_VM), GetUnitLoc(udg_DH)) / 3) - 100
set udg_Knockback2DUnit = gg_unit_n003_0022
set udg_Knockback2DCollision = -1
set udg_Knockback2DFriction = 4
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitFacingTimed(gg_unit_n003_0022, 180, 2)
call SetUnitTimeScale(udg_DH, 0.4)
call SetUnitAnimationByIndex(udg_DH, 9)
call SetUnitFlyHeight(gg_unit_n003_0022, 32, 32)
call CameraSetupApplyForceDuration(gg_cam_Cam_69, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_70, true, 2)
call DestroyEffect(bj_lastCreatedEffect)
call Wait(0.8)
endfunction
function Act1F58 takes nothing returns nothing
call SetUnitAnimationByIndex(udg_VM, 10)
call CameraSetupApplyForceDuration(gg_cam_Cam_67, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_68, true, 0.55)
call Wait(0.55)
endfunction
function Act1F57 takes nothing returns nothing
call SetUnitFlyHeight(gg_unit_n003_0022, 64, 64)
call Wait(1)
endfunction
function Act1F56 takes nothing returns nothing
call SetUnitAnimationByIndex(udg_VM, 6)
call CameraSetupApplyForceDuration(gg_cam_Cam_65, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_66, true, 2)
set udg_DoFade[1] = false
call Wait(1)
endfunction
function Act1F55 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_63, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_64, true, 2)
call SetUnitPositionLoc(udg_VM, GetRectCenter(gg_rct_23))
call SetUnitAnimationByIndex(udg_VM, 1)
call SetUnitFacing(udg_VM, 270)
call ShowUnit(gg_unit_n002_0021, false)
set bj_lastCreatedEffect = AddSpecialEffectLoc("war3mapimported\\DarkHarvest.mdl", GetRectCenter(gg_rct_23))
set udg_VM_Trans = 100
set udg_DoFade[1] = true
call Wait(2)
endfunction
function Act1F54 takes nothing returns nothing
call SetUnitPositionLoc(gg_unit_n002_0021, GetRectCenter(gg_rct_22))
call SetUnitFacing(gg_unit_n002_0021, AngleBetweenPoints(GetUnitLoc(gg_unit_n002_0021), GetUnitLoc(udg_DH)))
call ShowUnit(gg_unit_n002_0021, true)
call SetUnitFlyHeight(gg_unit_n002_0021, 128, 0)
call SetUnitAnimationByIndex(udg_DH, 9)
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(gg_unit_n002_0021), GetUnitLoc(udg_DH))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = DistanceBetweenPoints(GetUnitLoc(gg_unit_n002_0021), GetUnitLoc(udg_DH))
set udg_Knockback2DUnit = gg_unit_n002_0021
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitFacingTimed(udg_DH, 90, 2)
call CameraSetupApplyForceDuration(gg_cam_Cam_61, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_62, true, 2)
call Wait(2)
endfunction
function Act1F53 takes nothing returns nothing
call SetUnitAnimationByIndex(udg_DH, 6)
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(udg_DH), GetUnitLoc(gg_unit_hfoo_0013))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = (DistanceBetweenPoints(GetUnitLoc(udg_DH), GetUnitLoc(gg_unit_hfoo_0013)) / 2) - 96
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call CameraSetupApplyForceDuration(gg_cam_Cam_60, true, 2)
call Wait(2)
endfunction
function Act1F52 takes nothing returns nothing
call SetUnitAnimationByIndex(udg_DH, 9)
call SetUnitFacing(udg_DH, 245)
call Wait(1)
endfunction
function Act1F51 takes nothing returns nothing
local real r = 1 / 1.133
call CameraSetupApplyForceDuration(gg_cam_Cam_59, true, 1)
call slide(udg_DH, 64, 3, GetUnitLoc(udg_VM))
call SetUnitTimeScale(udg_DH, r)
call SetUnitAnimationByIndex(udg_DH, 3)
call SetUnitAnimationByIndex(udg_VM, 7)
call Wait(1)
endfunction
function Act1F50 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_58, true, 0)
call Wait(1)
endfunction
function Act1F49 takes nothing returns nothing
call SetUnitFacingToFaceUnitTimed(udg_VM, udg_DH, 0.5)
call SetUnitFacingToFaceUnitTimed(udg_DH, udg_VM, 0.5)
call SetUnitAnimationByIndex(udg_VM, 1)
call CameraSetupApplyForceDuration(gg_cam_Cam_57, true, 0)
call StopMusic(false)
call ClearMapMusic()
call StopMusic(false)
call PlayMusic(gg_snd_BladeAndBlood)
call Wait(1)
endfunction
function Act1F48 takes nothing returns nothing
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(udg_VM), GetUnitLoc(gg_unit_hfoo_0013))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = 410
set udg_Knockback2DUnit = gg_unit_hfoo_0013
set udg_Knockback2DCollision = -1
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 9)
call SetUnitAnimationByIndex(udg_DH, 9)
call SetUnitAnimationByIndex(udg_VM, 0)
call StartSound(gg_snd_MetalMediumSliceFlesh3)
call Wait(2)
endfunction
function Act1F47 takes nothing returns nothing
call SetUnitTimeScale(udg_VM, 1 / 1.1)
call SetUnitAnimationByIndex(udg_VM, 9)
call SetUnitFacingToFaceUnitTimed(gg_unit_hfoo_0013, udg_VM, 0.25)
call Wait(0.7)
endfunction
function Act1F46 takes nothing returns nothing
local real r = 1 / 2.333
call SetUnitPositionLoc(udg_VM, GetRectCenter(gg_rct_21))
call SetUnitFlyHeight(udg_VM, 0, 1024)
call SetUnitFacingToFaceUnitTimed(udg_VM, gg_unit_hfoo_0013, 0)
call SetUnitTimeScale(udg_VM, 1.5)
call SetUnitAnimationByIndex(udg_VM, 3)
call CameraSetupApplyForceDuration(gg_cam_Cam_55, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_56, true, 1)
call StartSound(gg_snd_HeroDreadLordDeathRev)
call Wait(1)
endfunction
function Act1F45 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_53, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_54, true, 2)
call Wait(2)
endfunction
function Act1F44 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_47, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_46, true, 2)
call ShowUnit(gg_unit_n002_0021, false)
call Wait(2)
endfunction
function Act1F43 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_52, true, 0)
call Wait(1)
endfunction
function Act1F42 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_51, true, 0)
call Wait(1)
endfunction
function Act1F41 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_50, true, 0)
call Wait(1)
endfunction
function Act1F40 takes nothing returns nothing
call Talk("Well, I saw a bat wandering weirdly...", 4, gg_snd_Brother2)
call CameraSetupApplyForceDuration(gg_cam_Cam_46, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_47, true, 4)
call Wait(4)
endfunction
function Act1F39 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_48, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_49, true, 2)
call Wait(2)
endfunction
function Act1F38 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_46, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_47, true, 2)
call Talk("Are you sure he was seen here, brother?", 4, gg_snd_Jack15)
call SetUnitFacingToFaceUnitTimed(udg_DH, gg_unit_hfoo_0013, 0.5)
call SetUnitFacingToFaceUnitTimed(gg_unit_hfoo_0013, udg_DH, 0.5)
call Wait(2)
endfunction
function Act1F37 takes nothing returns nothing
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 0)
call SetUnitAnimationByIndex(udg_DH, 7)
call CameraSetupApplyForceDuration(gg_cam_Cam_44, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_45, true, 4)
call ShowUnit(gg_unit_n002_0021, true)
call SetUnitFlyHeight(gg_unit_n002_0021, 512, 0)
call DestroyTextTag(bj_lastCreatedTextTag)
call SetUnitFacing(gg_unit_n002_0021, AngleBetweenPoints(GetUnitLoc(gg_unit_n002_0021), GetRectCenter(gg_rct_20)))
set udg_Knockback2DAngle = AngleBetweenPoints(GetUnitLoc(gg_unit_n002_0021), GetRectCenter(gg_rct_20))
set udg_Knockback2DTime = 4
set udg_Knockback2DDistance = DistanceBetweenPoints(GetUnitLoc(gg_unit_n002_0021), GetRectCenter(gg_rct_20)) / 2
set udg_Knockback2DUnit = gg_unit_n002_0021
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call Wait(4)
endfunction
function Act1F36 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call SetUnitMoveSpeed(udg_DH, 200)
call SetUnitMoveSpeed(gg_unit_hfoo_0013, 200)
call Talk("|cFF959697I shall defeat him.|r", 4, gg_snd_Jack14)
call ResetUnitLookAt(udg_DH)
call SetUnitPositionLoc(udg_DH, GetRectCenter(gg_rct_16))
call SetUnitPositionLoc(gg_unit_hfoo_0013, GetRectCenter(gg_rct_17))
call SetUnitFacing(udg_DH, AngleBetweenPoints(GetRectCenter(gg_rct_16), GetRectCenter(gg_rct_18)))
call SetUnitFacing(gg_unit_hfoo_0013, AngleBetweenPoints(GetRectCenter(gg_rct_17), GetRectCenter(gg_rct_19)))
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 6)
set udg_Knockback2DAngle = AngleBetweenPoints(GetRectCenter(gg_rct_16), GetRectCenter(gg_rct_18))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = DistanceBetweenPoints(GetRectCenter(gg_rct_16), GetRectCenter(gg_rct_18)) / 2
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
/* Line Break */
set udg_Knockback2DAngle = AngleBetweenPoints(GetRectCenter(gg_rct_17), GetRectCenter(gg_rct_19))
set udg_Knockback2DTime = 2
set udg_Knockback2DDistance = DistanceBetweenPoints(GetRectCenter(gg_rct_17), GetRectCenter(gg_rct_19)) / 2
set udg_Knockback2DUnit = gg_unit_hfoo_0013
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call CameraSetupApplyForceDuration(gg_cam_Cam_42, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_43, true, 2)
call Wait(2)
endfunction
function Act1F35 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F34 takes nothing returns nothing
call SetUnitPositionLoc(udg_DH, GetRectCenter(gg_rct_14))
call SetUnitFacing(udg_DH, AngleBetweenPoints(GetRectCenter(gg_rct_14), GetRectCenter(gg_rct_15)))
call SetUnitTimeScale(gg_unit_n001_0019, 1.2)
call SetUnitAnimationByIndex(gg_unit_n001_0019, 1)
call Talk("|cFF959697And now with the help of my brother...|r", 4, gg_snd_Jack13)
call CameraSetupApplyForceDuration(gg_cam_Cam_40, true, 0)
call SetUnitLookAt(udg_DH, "bone_head", gg_unit_hfoo_0020, 0, 0, 90)
call CameraSetupApplyForceDuration(gg_cam_Cam_41, true, 4)
set udg_Knockback2DAngle = AngleBetweenPoints(GetRectCenter(gg_rct_14), GetRectCenter(gg_rct_15))
set udg_Knockback2DTime = 4
set udg_Knockback2DDistance = DistanceBetweenPoints(GetRectCenter(gg_rct_14), GetRectCenter(gg_rct_15)) / 2
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F33 takes nothing returns nothing
call SetUnitAnimationByIndex(udg_DHy, 189)
call SetUnitPositionLoc(udg_DHy, GetRectCenter(gg_rct_13))
call CameraSetupApplyForceDuration(gg_cam_Cam_38, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_39, true, 4)
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 4, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F32 takes nothing returns nothing
local real r = 1.667 * 2
call SetUnitPositionLoc(udg_DHy, GetRectCenter(gg_rct_11))
call SetUnitTimeScale(udg_DHy, 0.5)
call slide(udg_DHy, 64, r, GetRectCenter(gg_rct_12))
call SetUnitAnimationByIndex(udg_DHy, 30)
call CameraSetupApplyForceDuration(gg_cam_Cam_36, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_37, true, r)
call SetUnitFacing(udg_DHy, AngleBetweenPoints(GetUnitLoc(udg_DHy), GetRectCenter(gg_rct_12)))
call CreateTextTagLocBJ("|cFF959697With the voices of: |r|cFF7EBFF1DivineArms |r|cFF959697and |r|cFF7EBFF1Arad MNK|r", PolarProjectionBJ(GetRectCenter(gg_rct_12), 256, 90), 128, 20, 100, 100, 100, 0)
call Wait(r)
endfunction
function Act1F31 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_35, true, 0)
call SetUnitAnimationByIndex(udg_DHy, 99)
call DestroyTextTag(bj_lastCreatedTextTag)
call Talk("|cFF959697Only to beat him.|r", 4, gg_snd_Jack12)
call Wait(2)
endfunction
function Act1F30 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_34, true, 0)
call SetUnitAnimationByIndex(udg_DHy, 98)
call DestroyTextTag(bj_lastCreatedTextTag)
call CreateTextTagLocBJ("|cFF7EBFF1Music by |r|cFF959697Blizzard Entertainment|r|cFF7EBFF1and |r|cFF959697incompetech.com|r", PolarProjectionBJ(GetUnitLoc(udg_DHy), 256, 90), 128, 20, 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F29 takes nothing returns nothing
call SetUnitPositionLoc(udg_DHy, GetRectCenter(gg_rct_10))
call SetUnitFacing(udg_DHy, 90)
call SetUnitTimeScale(udg_DHy, 1)
call SetUnitAnimationByIndex(udg_DHy, 97)
call CameraSetupApplyForceDuration(gg_cam_Cam_32, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_33, true, 4)
call Talk("|cFF959697I exercised and worked hard every day...|r", 4, gg_snd_Jack11)
call SetUnitTimeScale(udg_DH, 0.5)
call DestroyTextTag(bj_lastCreatedTextTag)
call CreateTextTagLocBJ(udg_S_Sys, GetRectCenter(gg_rct_25), 128, 20, 100, 100, 100, 0)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F28 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F27 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call SetUnitVertexColor(udg_DH, 255, 255, 255, 255)
call SetUnitFacing(udg_DH, AngleBetweenPoints(GetRectCenter(gg_rct_7), GetRectCenter(gg_rct_8)))
call SetUnitPositionLoc(udg_DH, GetRectCenter(gg_rct_7))
call SetUnitTimeScale(udg_DH, 0.8)
call SetUnitAnimationByIndex(udg_DH, 6)
call CameraSetupApplyForceDuration(gg_cam_Cam_30, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_31, true, 4)
set udg_Knockback2DAngle = AngleBetweenPoints(GetRectCenter(gg_rct_7), GetRectCenter(gg_rct_8))
set udg_Knockback2DTime = 4
set udg_Knockback2DDistance = DistanceBetweenPoints(GetRectCenter(gg_rct_7), GetRectCenter(gg_rct_8)) / 2
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call DestroyTextTag(bj_lastCreatedTextTag)
call CreateTextTagLocBJ(udg_S_Tex, GetRectCenter(gg_rct_9), 128, 20, 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F26 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 3, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(3)
endfunction
function Act1F25 takes nothing returns nothing
call SetUnitPositionLoc(udg_DHy, GetRectCenter(gg_rct_6))
call Talk("|cFF959697He took my wife... Leaving me only a daughter.|r", 4, gg_snd_Jack10)
call SetUnitFacing(udg_DHy, 90)
call SetUnitFacingTimed(udg_DHy, 105, 4)
call SetUnitTimeScale(udg_DHy, 0.2)
call CameraSetupApplyForceDuration(gg_cam_Cam_28, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_29, true, 4)
call SetUnitAnimationByIndex(udg_DHy, 185)
call SetUnitAnimationByIndex(udg_VM, 3)
call SetUnitFlyHeight(udg_VM, 512, 128)
call SetUnitScale(udg_DHy, 1.5, 1.5, 1.5)
call DestroyTextTag(bj_lastCreatedTextTag)
call CreateTextTagLocBJ(udg_S_ModOth, GetUnitLoc(udg_DHy), 128, 20, 100, 100, 100, 0)
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F24 takes nothing returns nothing
call SetUnitAnimationByIndex(udg_DHy, 187)
set udg_Knockback2DAngle = GetUnitFacing(udg_DHy)
set udg_Knockback2DTime = 4
set udg_Knockback2DDistance = 256
set udg_Knockback2DUnit = udg_DHy
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 4, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F23 takes nothing returns nothing
local real r = 1.167 * 2
call SetUnitAnimationByIndex(udg_DHy, 137)
call SetUnitTimeScale(udg_DHy, 0.5)
call StartSound(gg_snd_WomanDeath)
call SetUnitAnimationByIndex(gg_unit_nvlw_0017, 4)
call CameraSetupApplyForceDuration(gg_cam_Cam_26, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_27, true, r)
call DestroyTextTag(bj_lastCreatedTextTag)
call CreateTextTagLocBJ(udg_S_ModEnv, GetUnitLoc(udg_DHy), 128, 20, 100, 100, 100, 0)
call CinematicFade(bj_CINEFADETYPE_FADEIN, r - 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(r)
endfunction
function Act1F22 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 3, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(3)
endfunction
function Act1F21 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_25, true, 0)
call SetUnitPositionLoc(udg_DH, GetRectCenter(gg_rct_4))
call SetUnitTimeScale(udg_DH, 0.17)
call SetUnitFacing(udg_DH, 0)
call SetUnitAnimationByIndex(udg_DH, 3)
call slide(udg_DH, 512, 7, GetRectCenter(gg_rct_5))
call SetUnitVertexColor(udg_DH, 20, 20, 20, 255)
call DestroyTextTag(bj_lastCreatedTextTag)
call Talk("|cFF959697Revenge, because of a single night.|r", 4, gg_snd_Jack9)
call CreateTextTagLocBJ("|cFF959697Made by |r|cFF7EBFF1Arad MNK|r", GetRectCenter(gg_rct_5), 128, 20, 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F20 takes nothing returns nothing
local location l = GetRectCenter(gg_rct_2)
local location where = GetRectCenter(gg_rct_3)
call CreateTextTagLocBJ("|cFF7EBFF1M|r|cFF7EBEF0a|r|cFF7FBEEEd|r|cFF7FBDEDe|r|cFF7FBCEB |r|cFF80BCEAf|r|cFF80BBE9o|r|cFF80BBE7r|r|cFF81BAE6 |r|cFF81B9E5H|r|cFF82B9E3i|r|cFF82B8E2v|r|cFF82B7E0e|r|cFF83B7DFw|r|cFF83B6DEo|r|cFF83B6DCr|r|cFF84B5DBk|r|cFF84B4D9s|r|cFF84B4D8h|r|cFF85B3D7o|r|cFF85B2D5p|r|cFF85B2D4'|r|cFF86B1D3s|r|cFF86B0D1(|r|cFF86B0D0w|r|cFF87AFCEw|r|cFF87AFCDw|r|cFF88AECC.|r|cFF88ADCAh|r|cFF88ADC9i|r|cFF89ACC7v|r|cFF89ABC6e|r|cFF89ABC5w|r|cFF8AAAC3o|r|cFF8AAAC2r|r|cFF8AA9C1k|r|cFF8BA8BFs|r|cFF8BA8BEh|r|cFF8BA7BCo|r|cFF8CA6BBp|r|cFF8CA6BA.|r|cFF8DA5B8c|r|cFF8DA5B7o|r|cFF8DA4B5m|r|cFF8EA3B4)|r|cFF8EA3B3 |r|cFF8EA2B1C|r|cFF8FA1B0i|r|cFF8FA1AFn|r|cFF8FA0ADe|r|cFF909FACm|r|cFF909FAAa|r|cFF909EA9t|r|cFF919EA8i|r|cFF919DA6c|r|cFF919CA5 |r|cFF929CA3C|r|cFF929BA2o|r|cFF939AA1n|r|cFF939A9Ft|r|cFF93999Ee|r|cFF94999Ds|r|cFF94989Bt|r|cFF94979A |r|cFF959798#|r|cFF9596976|r", where, 256, 10, 100, 100, 100, 0)
call SetUnitPositionLoc(udg_DH, l)
call SetUnitFacing(udg_DH, AngleBetweenPoints(l, where))
call CinematicFade(bj_CINEFADETYPE_FADEIN, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
set udg_Knockback2DAngle = AngleBetweenPoints(l, where)
set udg_Knockback2DTime = 4
set udg_Knockback2DDistance = 512
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call CameraSetupApplyForceDuration(gg_cam_Cam_23, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_24, true, 4)
call Talk("|cFF959697For a revenge from someone, I now head to the city.|r", 4, gg_snd_Jack8)
call SetUnitTimeScale(udg_DH, 0.5)
call Wait(4)
endfunction
function Act1F19 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(2)
endfunction
function Act1F18 takes nothing returns nothing
local location l = GetUnitLoc(udg_DH)
local location where = GetRectCenter(gg_rct_1)
local real dx = GetLocationX(where) - GetLocationX(l)
local real dy = GetLocationY(where) - GetLocationY(l)
set udg_Knockback2DAngle = bj_RADTODEG * Atan2(GetLocationY(where) - GetLocationY(l), GetLocationX(where) - GetLocationX(l))
set udg_Knockback2DTime = 4
set udg_Knockback2DDistance = SquareRoot(dx * dx + dy * dy)
set udg_Knockback2DUnit = udg_DH
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitAnimationByIndex(udg_DH, 6)
call SetUnitTimeScale(udg_DH, 0.6)
call CameraSetupApplyForceDuration(gg_cam_Cam_21, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_22, true, 4)
call Wait(2)
endfunction
function Act1F17 takes nothing returns nothing
local real r = 3.534 * (1 / 0.3)
call SetUnitAnimationByIndex(udg_DH, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_20, true, r)
call Talk("|cFF959697Although I'm not sure.|r", 4, gg_snd_Jack7)
call Wait(r)
endfunction
function Act1F16 takes nothing returns nothing
local real r = (5.467 * (1 / 0.3) - 12)
call CameraSetupApplyForceDuration(gg_cam_Cam_19, true, r)
call Wait(r)
endfunction
function Act1F15 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_18, true, 0)
call Talk("|cFF959697I told my daughter I'll be back...|r", 4, gg_snd_Jack6)
call Wait(3)
endfunction
function Act1F14 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call ShowUnit(gg_unit_hfoo_0013, true)
call CameraSetupApplyForceDuration(gg_cam_Cam_16, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_17, true, 4)
call ResetUnitLookAt(udg_DH)
call SetUnitFacing(udg_DH, 25)
call SetUnitPositionLoc(udg_DH, GetRectCenter(gg_rct_0))
call Wait(4)
endfunction
function Act1F13 takes nothing returns nothing
local location DHpos = GetUnitLoc(gg_unit_nhef_0015)
local real x = GetLocationX(DHpos) + 10 * Cos(GetUnitFacing(udg_DH) * bj_DEGTORAD)
local real y = GetLocationY(DHpos) + 10 * Sin(GetUnitFacing(udg_DH) * bj_DEGTORAD)
local location where = Location(x, y)
local real dx = GetLocationX(where) - GetLocationX(DHpos)
local real dy = GetLocationY(where) - GetLocationY(DHpos)
call CameraSetupApplyForceDuration(gg_cam_Cam_13, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_15, true, 4)
call SetUnitTimeScale(gg_unit_nhef_0015, 0.2)
call SetUnitAnimationByIndex(gg_unit_nhef_0015, 1)
call Talk("I love you, dad...", 3, gg_snd_Girl2)
set udg_Knockback2DAngle = 90
set udg_Knockback2DTime = 4
set udg_Knockback2DDistance = SquareRoot(dx * dx + dy * dy)
set udg_Knockback2DUnit = gg_unit_nhef_0015
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitAnimationByIndex(udg_DH, 1)
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 4, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call Wait(4)
endfunction
function Act1F12 takes nothing returns nothing
call Talk("Promise.", 3, gg_snd_Jack5)
call CameraSetupApplyForceDuration(gg_cam_Cam_14, true, 0)
call Wait(4)
endfunction
function Act1F11 takes nothing returns nothing
call Talk("Promise?", 3, gg_snd_Girl1)
call CameraSetupApplyForceDuration(gg_cam_Cam_13, true, 0)
call Wait(4)
endfunction
function Act1F10 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEIN, 1, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_11, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_12, true, 4)
call SetUnitAnimationByIndex(gg_unit_H000_0014, 12)
call SetUnitAnimationByIndex(gg_unit_nhef_0015, 0)
call Talk("I promise I'll be back, Sweetheart.", 4, gg_snd_Jack4)
call SetUnitLookAt(gg_unit_H000_0014, "bone_head", gg_unit_nhef_0015, 0, 0, 80)
call SetUnitLookAt(gg_unit_nhef_0015, "bone_head", gg_unit_H000_0014, 0, 0, 100)
call Wait(5)
endfunction
function Act1F9 takes nothing returns nothing
local location DHpos = GetUnitLoc(udg_DH)
local real x = GetLocationX(DHpos) + 256 * Cos((GetUnitFacing(udg_DH) - 20) * bj_DEGTORAD)
local real y = GetLocationY(DHpos) + 256 * Sin((GetUnitFacing(udg_DH) - 20) * bj_DEGTORAD)
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 3, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_8, true, 0)
call Look(udg_DH, x, y, 0, x, y, 128, 4)
call Wait(4)
call RemoveLocation(DHpos)
set DHpos = null
endfunction
function Act1F8 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_9, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_10, true, 5)
call Talk("He has come...", 5, gg_snd_Brother1)
call Wait(5)
endfunction
function Act1F7 takes nothing returns nothing
call Talk("What is it.", 5, gg_snd_Jack3)
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 0)
call Wait(5)
endfunction
function Act1F6 takes nothing returns nothing
local location DHpos = GetUnitLoc(udg_DH)
local location HFpos = GetUnitLoc(gg_unit_hfoo_0013)
local location HFNpos = PolarProjectionBJ(HFpos, 128, 10)
local real x = GetLocationX(DHpos) + 256 * Cos((GetUnitFacing(udg_DH) - 20) * bj_DEGTORAD)
local real y = GetLocationY(DHpos) + 256 * Sin((GetUnitFacing(udg_DH) - 20) * bj_DEGTORAD)
call ShowUnit(gg_unit_hfoo_0013, true)
call SetUnitTimeScale(gg_unit_hfoo_0013, 0.5)
call SetUnitAnimationByIndex(gg_unit_hfoo_0013, 6)
call SetUnitAnimationByIndex(udg_DH, 12)
call CameraSetupApplyForceDuration(gg_cam_Cam_8, true, 0)
call SetUnitPositionLoc(gg_unit_hfoo_0013, HFNpos)
call Wait(1)
set udg_Knockback2DAngle = AngleBetweenPoints(HFNpos, HFpos)
set udg_Knockback2DTime = 1
set udg_Knockback2DDistance = DistanceBetweenPoints(HFNpos, HFpos) / 2
set udg_Knockback2DUnit = gg_unit_hfoo_0013
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call Look(udg_DH, x, y, 0, x, y, 0, 0)
call RemoveLocation(DHpos)
set DHpos = null
endfunction
function Act1F5 takes nothing returns nothing
local location DHpos = GetUnitLoc(udg_DH)
local real x = GetLocationX(DHpos) + 256 * Cos(GetUnitFacing(udg_DH) * bj_DEGTORAD)
local real y = GetLocationY(DHpos) + 256 * Sin(GetUnitFacing(udg_DH) * bj_DEGTORAD)
local real r = 1.167 * (1 / 0.3)
call SetUnitAnimationByIndex(udg_DH, 2)
call slide(udg_DH, 256, r, Location(x, y))
call CameraSetupApplyForceDuration(gg_cam_Cam_7, true, r)
call Talk("|cFF959697When I heard a familiar voice.|r", 4, gg_snd_Jack2)
call Wait(r)
call RemoveLocation(DHpos)
set DHpos = null
endfunction
function Act1F4 takes nothing returns nothing
local real r = 1.134 * (1 / 0.3)
call SetUnitAnimationByIndex(udg_DH, 8)
call SetUnitFacingTimed(udg_DH, 180, r)
call CameraSetupApplyForceDuration(gg_cam_Cam_6, true, r)
call Wait(r)
endfunction
function Act1F3 takes nothing returns nothing
local location DHpos = GetUnitLoc(udg_DH)
local real x = GetLocationX(DHpos) + 256 * Cos(GetUnitFacing(udg_DH) * bj_DEGTORAD)
local real y = GetLocationY(DHpos) + 256 * Sin(GetUnitFacing(udg_DH) * bj_DEGTORAD)
local real r = 1.113 * (1 / 0.3)
call CameraSetupApplyForceDuration(gg_cam_Cam_4, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_5, true, r)
call SetUnitTimeScale(udg_DH, 0.3)
call SetUnitTimeScale(gg_unit_nhef_0015, 0.3)
call SetUnitAnimationByIndex(udg_DH, 3)
call slide(udg_DH, 256, r, Location(x, y))
call Talk("|cFF959697One day I was practicing...|r", 4, gg_snd_Jack1)
call Wait(r)
call RemoveLocation(DHpos)
set DHpos = null
endfunction
function Act1F2 takes nothing returns nothing
call CameraSetupApplyForceDuration(gg_cam_Cam_3, true, 4)
call Wait(4)
endfunction
function Act1F1 takes nothing returns nothing
call CinematicFade(bj_CINEFADETYPE_FADEIN, 2, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 100, 100, 100, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_1, true, 0)
call CameraSetupApplyForceDuration(gg_cam_Cam_2, true, 4)
call Wait(4)
endfunction
function EndFade takes nothing returns nothing
if (bj_cineFadeContinueTimer != null) then
call DestroyTimer(bj_cineFadeContinueTimer)
endif
if (bj_cineFadeFinishTimer != null) then
call DestroyTimer(bj_cineFadeFinishTimer)
endif
call SetCineFilterTexture("Ls.tga")
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(0, 0, 0, 255)
call SetCineFilterDuration(2)
call DisplayCineFilter(true)
call Wait(2)
endfunction
function Initializer takes nothing returns nothing
local timer t = CreateTimer()
call StopMusic(false)
call ClearMapMusic()
call StopMusic(false)
call PlayMusic(gg_snd_Nightsong)
if (not bj_cineModeAlreadyIn) then
set bj_cineModeAlreadyIn = true
set bj_cineModePriorSpeed = GetGameSpeed()
set bj_cineModePriorFogSetting = IsFogEnabled()
set bj_cineModePriorMaskSetting = IsFogMaskEnabled()
set bj_cineModePriorDawnDusk = bj_useDawnDuskSounds
set bj_cineModeSavedSeed = GetRandomInt(0, 1000000)
endif
if (IsPlayerInForce(GetLocalPlayer(), bj_FORCE_ALL_PLAYERS)) then
call ClearTextMessages()
call ShowInterface(false, 0)
call EnableUserControl(false)
call EnableOcclusion(false)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_UNITMOVEMENT, bj_CINEMODE_VOLUME_UNITMOVEMENT)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_UNITSOUNDS, bj_CINEMODE_VOLUME_UNITSOUNDS)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_COMBAT, bj_CINEMODE_VOLUME_COMBAT)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_SPELLS, bj_CINEMODE_VOLUME_SPELLS)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_UI, bj_CINEMODE_VOLUME_UI)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_MUSIC, bj_CINEMODE_VOLUME_MUSIC)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_AMBIENTSOUNDS, bj_CINEMODE_VOLUME_AMBIENTSOUNDS)
call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_FIRE, bj_CINEMODE_VOLUME_FIRE)
endif
call SetGameSpeed(bj_CINEMODE_GAMESPEED)
call SetMapFlag(MAP_LOCK_SPEED, true)
call FogMaskEnable(false)
call FogEnable(false)
call EnableWorldFogBoundary(false)
set bj_useDawnDuskSounds = false
call SetRandomSeed(0)
call UnitAddAbility(udg_DH, 'Arav')
call UnitAddAbility(udg_VM, 'Arav')
call UnitAddAbility(udg_DHy, 'Arav')
call CinematicFade(bj_CINEFADETYPE_FADEOUT, 0, "Ls.tga", 100, 100, 100, 0)
call TimerStart(t, 2, false, function EndFade)
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Initialization_Actions takes nothing returns nothing
local string ModOth1 = "|cFF7EBFF1Other models by |r|cFF959697Thrikodius|r|cFF7EBFF1, |r|cFF959697HateCrew|r|cFF7EBFF1, |r|cFF959697Graber|r|cFF7EBFF1, |r|cFF959697Tobyfat50|r|cFF7EBFF1, |r|cFF959697WILL THE ALMIGHTY|r|cFF7EBFF1,|r|cFF959697 Aquis|r|cFF7EBFF1, |r|cFF959697Felipe Gormadoc |r|cFF7EBFF1and |r|cFF959697ikillforeyou|r"
set udg_S_ModEnv = "|cFF7EBFF1Enviroment Models from |r|cFF959697UTM|r|cFF7EBFF1, |r|cFF959697B2M |r|cFF7EBFF1and |r|cFF959697S&S|r"
set udg_S_ModOth = ModOth1
set udg_S_Sys = "|cFF7EBFF1Systems provided by |r|cFF959697Bribe |r|cFF7EBFF1and|r|cFF959697 Arad MNK|r"
set udg_S_Tex = "|cFF7EBFF1Textures by |r|cFF959697Xezko|r|cFF7EBFF1, |r|cFF959697Radicool|r|cFF7EBFF1, |r|cFF959697Stanakin|r|cFF7EBFF1, |r|cFF959697shockwave |r|cFF7EBFF1and |r|cFF959697olyvian|r"
set udg_DH = gg_unit_H000_0000
set udg_DHy = gg_unit_H002_0016
set udg_VM = gg_unit_H001_0018
set udg_K[1] = gg_unit_nvk2_0025
set udg_K[2] = gg_unit_nvlk_0026
set udg_hfooFadeHandler = 20.00
call ShowUnit(gg_unit_hfoo_0013, false)
call ShowUnit(gg_unit_n002_0021, false)
call SetUnitLookAt(gg_unit_hfoo_0020, "bone_head", udg_DH, 0, 0, 90)
set bj_lastCreatedWeatherEffect = AddWeatherEffect(bj_mapInitialPlayableArea, 'LRma')
call EnableWeatherEffect(bj_lastCreatedWeatherEffect, true)
call SetSkyModel("war3mapImported\\MoonySky.mdx")
call SetFloatGameState(GAME_STATE_TIME_OF_DAY, 12)
call SetTimeOfDayScale(0)
call Initializer()
set ModOth1 = null
endfunction
//===========================================================================
function InitTrig_Initialization takes nothing returns nothing
set gg_trg_Initialization = CreateTrigger()
call TriggerAddAction(gg_trg_Initialization, function Trig_Initialization_Actions)
endfunction
//TESH.scrollpos=172
//TESH.alwaysfold=0
library Cinema
function WaitEx takes nothing returns nothing
set udg_Func_Num = udg_Func_Num + 1
call ExecuteFunc("Act" + I2S(udg_Act_Num) + "F" + I2S(udg_Func_Num))
endfunction
function Wait takes real sec returns nothing
local timer t = CreateTimer()
set udg_Time = udg_Time + sec
call TimerStart(t, sec, false, function WaitEx)
set t = null
endfunction
function WaitCus takes real sec, code func returns nothing
local timer t = CreateTimer()
call TimerStart(t, sec, false, func)
set t = null
endfunction
function CinematicFade takes integer fadetype, real duration, string tex, real red, real green, real blue, real trans returns nothing
if (fadetype == bj_CINEFADETYPE_FADEOUT) then
set udg_IsInFade = true
call AbortCinematicFadeBJ()
call CinematicFadeCommonBJ(red, green, blue, duration, tex, 100, trans)
elseif (fadetype == bj_CINEFADETYPE_FADEIN) then
set udg_IsInFade = false
call AbortCinematicFadeBJ()
call CinematicFadeCommonBJ(red, green, blue, duration, tex, trans, 100)
call FinishCinematicFadeAfterBJ(duration)
elseif (fadetype == bj_CINEFADETYPE_FADEOUTIN) then
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
endif
endfunction
function ClearTextMessage takes nothing returns nothing
call ClearTextMessages()
endfunction
function Talk takes string s, real dur, sound snd returns nothing
local string news = "\n\n\n\n\n\n" + s + "\n\n\n\n\n\n\n\n\n\n\n\n"
local real x = 1 - (I2R(StringLength(s)) * 0.004)
local real y = (R2I(I2R(StringLength(s)) / 70) + 1) * 0.1
local timer t = CreateTimer()
call TimerStart(t, I2R(GetSoundDuration(snd)) * 0.001, false, function ClearTextMessage)
call DisplayTimedTextToPlayer(Player(0), x, y, I2R(GetSoundDuration(snd)) * 0.001, news)
call StartSound(snd)
set news = null
set t = null
endfunction
function godown takes nothing returns nothing
local integer i = 1
loop
exitwhen i > udg_Slide_i
if udg_Slide_u[i] != null then
call SetUnitFlyHeight(udg_Slide_u[i], 0, (GetUnitFlyHeight(udg_Slide_u[i]) / udg_Slide_r[udg_Slide_i]))
set udg_Slide_u[i] = null
endif
set i = i + 1
endloop
endfunction
function slide takes unit u, real height, real dur, location where returns nothing
local location l = GetUnitLoc(u)
local real ddur = dur / 2
local timer t = CreateTimer()
local real dx = GetLocationX(where) - GetLocationX(l)
local real dy = GetLocationY(where) - GetLocationY(l)
if height > 0 then
if height != 0 then
set udg_Slide_i = udg_Slide_i + 1
set udg_Slide_u[udg_Slide_i] = u
set udg_Slide_r[udg_Slide_i] = ddur
call SetUnitFlyHeight(u, height, height / ddur)
call TimerStart(t, ddur, false, function godown)
endif
set udg_Knockback2DAngle = bj_RADTODEG * Atan2(GetLocationY(where) - GetLocationY(l), GetLocationX(where) - GetLocationX(l))
set udg_Knockback2DTime = dur
set udg_Knockback2DDistance = SquareRoot(dx * dx + dy * dy)
set udg_Knockback2DUnit = u
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
endif
call RemoveLocation(l)
set l = null
set t = null
endfunction
/*function go takes nothing returns nothing
call SetUnitX(gg_unit_H001_0013, GetLocationX(udg_TLloc))
call SetUnitY(gg_unit_H001_0013, GetLocationY(udg_TLloc))
call ShowUnit(gg_unit_H001_0013, false)
call UnitApplyTimedLife(bj_lastCreatedUnit, 'BTLF', 0.1)
call RemoveLocation(udg_TLloc)
endfunction
function back takes nothing returns nothing
local location upos = GetUnitLoc(gg_unit_H001_0013)
local effect p = AddSpecialEffectLoc("Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl", upos)
local unit dl = CreateUnitAtLoc(Player(0), 'Dum2', upos, 270)
set bj_lastCreatedUnit = dl
call ShowUnit(gg_unit_H001_0013, true)
call SetUnitAnimation(gg_unit_H001_0013, "stand channel")
call GroupAddUnit(udg_Turn_Group, dl)
call SetUnitFlyHeight(dl, 250, 250 / udg_TL_BackInt)
call DestroyEffect(p)
call RemoveLocation(upos)
set upos = null
set p = null
set dl = null
endfunction
function finish takes nothing returns nothing
call UnitApplyTimedLife(bj_lastCreatedUnit, 'BTLF', 0.1)
call SetUnitAnimation(gg_unit_H001_0013, "stand")
endfunction
function TL takes location l, real i, real stay, real out returns nothing
local location upos = GetUnitLoc(gg_unit_H001_0013)
local effect p = AddSpecialEffectLoc("Abilities\\Spells\\Orc\\Purge\\PurgeBuffTarget.mdl", upos)
local unit dl = CreateUnitAtLoc(Player(0), 'Dum2', upos, 270)
local timer ti = CreateTimer()
local timer tstay = CreateTimer()
local timer tout = CreateTimer()
set bj_lastCreatedUnit = dl
set udg_TL_BackInt = out
call SetUnitAnimation(gg_unit_H001_0013, "stand channel")
call GroupAddUnit(udg_Turn_Group, dl)
call SetUnitFlyHeight(dl, 250.00, 250.00 / i)
call TimerStart(ti, i, false, function go)
call TimerStart(tstay, i + stay, false, function back)
call TimerStart(tout, i + stay + out, false, function finish)
call DestroyEffect(p)
call RemoveLocation(upos)
set udg_TLloc = l
set upos = null
set p = null
set dl = null
set ti = null
set tstay = null
set tout = null
endfunction */
function CreateEqualShape takes location center, real radius, integer points returns nothing
local real x
local real y
local integer i = 1
loop
exitwhen i > points
set x = GetLocationX(center) + radius * Cos(360 / points * i * bj_DEGTORAD)
set y = GetLocationY(center) + radius * Sin(360 / points * i * bj_DEGTORAD)
set udg_ShapePoint[i] = Location(x, y)
set i = i +1
endloop
endfunction
function Look takes unit u, real startx, real starty, real startz, real endx, real endy, real endz, real dur returns nothing
local location l = Location(startx, starty)
local unit dum = CreateUnitAtLoc(Player(15), 'n000', l, 270)
local real dx = endx - startx
local real dy = endy - starty
set udg_Knockback2DAngle = bj_RADTODEG * Atan2(dy, dx)
set udg_Knockback2DTime = dur
set udg_Knockback2DDistance = SquareRoot(dx * dx + dy * dy)
set udg_Knockback2DUnit = dum
set udg_Knockback2DCollision = -1.00
set udg_Knockback2DSimple = true
call TriggerExecute(gg_trg_Knockback_2D)
call SetUnitFlyHeight(dum, startz, 0)
if dur == 0 then
call SetUnitFlyHeight(dum, endz, 0)
else
call SetUnitFlyHeight(dum, endz, endz / dur)
endif
call SetUnitLookAt(u, "bone_head", dum, 0, 0, 0)
set udg_LookDum_Int = udg_LookDum_Int + 1
set udg_LookDum[udg_LookDum_Int] = dum
call RemoveLocation(l)
set l = null
set dum = null
endfunction
endlibrary
//TESH.scrollpos=209
//TESH.alwaysfold=0
function K2DItemCheckXY takes real x, real y returns boolean
call SetItemPosition(udg_K2DItem, x, y)
return GetWidgetX(udg_K2DItem) == x and GetWidgetY(udg_K2DItem) == y
endfunction
function K2DItemCheckAxis takes real x, real y returns boolean
local real x2 = x*udg_K2DRadius[udg_UDex]
local real y2 = y*udg_K2DRadius[udg_UDex]
set x = udg_K2DX + x2
set y = udg_K2DY + y2
if K2DItemCheckXY(x, y) and not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY) then
set x = udg_K2DX - x2
set y = udg_K2DY - y2
return K2DItemCheckXY(x, y) and not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY)
endif
return false
endfunction
function K2DItemCheck takes nothing returns boolean
if K2DItemCheckXY(udg_K2DX, udg_K2DY) then
if udg_Knockback2DRobustPathing == 0 or udg_K2DRadius[udg_UDex] == 0 then
return true
endif
//Check horizontal axis of unit to make sure nothing is going to collide
if K2DItemCheckAxis(udg_K2DCosH[udg_UDex], udg_K2DSinH[udg_UDex]) then
//Check vertical axis of unit to ensure nothing will collide
if K2DItemCheckAxis(udg_K2DCos[udg_UDex], udg_K2DSin[udg_UDex]) then
if udg_Knockback2DRobustPathing == 1 or udg_K2DRadius[udg_UDex] < 17 then
return true
endif
//Check diagonal axis of unit if more thorough pathing is desired
if K2DItemCheckAxis(udg_K2DCosD1[udg_UDex], udg_K2DSinD1[udg_UDex]) then
if K2DItemCheckAxis(udg_K2DCosD2[udg_UDex], udg_K2DSinD2[udg_UDex]) then
return true
endif
endif
return false
endif
endif
return false
endif
return false
endfunction
function K2DItemFilter takes nothing returns boolean
//Check for visible items, temporarily hide them and add them to the filter.
if IsItemVisible(GetFilterItem()) then
call SetItemVisible(GetFilterItem(), false)
return true
endif
return false
endfunction
function K2DItemCode takes nothing returns nothing
//Perform the item-pathing check only once, then unhide those filtered items
if not udg_K2DItemsFound then
set udg_K2DItemsFound = true
set udg_K2DItemOffset = K2DItemCheck()
endif
call SetItemVisible(GetEnumItem(), true)
endfunction
function K2DKillDest takes nothing returns nothing
local real x
local real y
//Handle destruction of debris
set bj_destRandomCurrentPick = GetEnumDestructable()
if GetWidgetLife(bj_destRandomCurrentPick) > 0.405 and IssueTargetOrder(udg_K2DDebrisKiller, udg_Knockback2DTreeOrDebris, bj_destRandomCurrentPick) then
set x = GetWidgetX(bj_destRandomCurrentPick) - udg_K2DX
set y = GetWidgetY(bj_destRandomCurrentPick) - udg_K2DY
if x*x + y*y <= 16384.00 then //if the distance is 128.00 or less.
call KillDestructable(bj_destRandomCurrentPick)
endif
endif
endfunction
function Knockback2DCheckXY takes real x, real y returns boolean
local boolean result
set udg_K2DX = x + udg_K2DVelocity[udg_UDex]*udg_K2DCos[udg_UDex]
set udg_K2DY = y + udg_K2DVelocity[udg_UDex]*udg_K2DSin[udg_UDex]
if udg_K2DSimple[udg_UDex] then
//A "pull" effect or a missile system does not require complex pathing.
set result = udg_K2DX <= udg_K2DMaxX and udg_K2DX >= udg_K2DMinX and udg_K2DY <= udg_K2DMaxY and udg_K2DY >= udg_K2DMinY
elseif not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_WALKABILITY) then
call MoveRectTo(udg_K2DRegion, udg_K2DX, udg_K2DY)
if udg_K2DKillTrees[udg_UDex] then
call SetUnitX(udg_K2DDebrisKiller, udg_K2DX)
call SetUnitY(udg_K2DDebrisKiller, udg_K2DY)
call EnumDestructablesInRect(udg_K2DRegion, null, function K2DKillDest)
endif
call EnumItemsInRect(udg_K2DRegion, Filter(function K2DItemFilter), function K2DItemCode)
if udg_K2DItemsFound then
set result = udg_K2DItemOffset
set udg_K2DItemOffset = false
set udg_K2DItemsFound = false
else
set result = K2DItemCheck()
endif
call SetItemPosition(udg_K2DItem, udg_K2DMaxX, udg_K2DMaxY)
call SetItemVisible(udg_K2DItem, false)
else
set result = udg_K2DAmphibious[udg_UDex] and not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_FLOATABILITY)
endif
return result
endfunction
function Knockback2DApplyAngle takes real angle returns nothing
set angle = ModuloReal(angle, udg_Radians_Turn)
set udg_K2DCos[udg_UDex] = Cos(angle)
set udg_K2DSin[udg_UDex] = Sin(angle)
set udg_K2DAngle[udg_UDex] = angle
if udg_Knockback2DRobustPathing > 0 then
set angle = ModuloReal(angle + udg_Radians_QuarterTurn, udg_Radians_Turn)
set udg_K2DCosH[udg_UDex] = Cos(angle)
set udg_K2DSinH[udg_UDex] = Sin(angle)
if udg_Knockback2DRobustPathing == 2 and udg_K2DRadius[udg_UDex] > 16 then
set angle = ModuloReal(angle + udg_Radians_QuarterPi, udg_Radians_Turn)
set udg_K2DCosD1[udg_UDex] = Cos(angle)
set udg_K2DSinD1[udg_UDex] = Sin(angle)
set angle = ModuloReal(angle + udg_Radians_QuarterTurn, udg_Radians_Turn)
set udg_K2DCosD2[udg_UDex] = Cos(angle)
set udg_K2DSinD2[udg_UDex] = Sin(angle)
endif
endif
endfunction
function Knockback2DLooper takes nothing returns nothing
local unit u
local real x
local real y
call PauseUnit(udg_K2DDebrisKiller, false)
set udg_UDex = udg_K2DNext[0]
loop
exitwhen udg_UDex == 0
set udg_K2DTimeLeft[udg_UDex] = udg_K2DTimeLeft[udg_UDex] - udg_K2DTimeout
set u = udg_UDexUnits[udg_UDex]
if udg_K2DTimeLeft[udg_UDex] > 0.00 then
if udg_K2DTimeLeft[udg_UDex] < udg_K2DHeightThreshold[udg_UDex] and udg_K2DHeightThreshold[udg_UDex] != 0.00 then
call SetUnitFlyHeight(u, GetUnitDefaultFlyHeight(u), GetUnitFlyHeight(u) - GetUnitDefaultFlyHeight(u)/udg_K2DHeightThreshold[udg_UDex])
set udg_K2DHeightThreshold[udg_UDex] = 0.00
endif
if udg_K2DPause[udg_UDex] then
set x = udg_K2DLastX[udg_UDex]
set y = udg_K2DLastY[udg_UDex]
else
set x = GetUnitX(u)
set y = GetUnitY(u)
endif
if not Knockback2DCheckXY(x, y) then
if not udg_K2DFreeze[udg_UDex] and IsTriggerEnabled(udg_K2DImpact[udg_UDex]) and TriggerEvaluate(udg_K2DImpact[udg_UDex]) then
call TriggerExecute(udg_K2DImpact[udg_UDex])
endif
if udg_K2DBounce[udg_UDex] then
call Knockback2DApplyAngle(udg_Radians_Turn - udg_K2DAngle[udg_UDex])
if not Knockback2DCheckXY(x, y) then
call Knockback2DApplyAngle(udg_K2DAngle[udg_UDex] + bj_PI)
if not Knockback2DCheckXY(x, y) then
call Knockback2DApplyAngle(udg_Radians_Turn - udg_K2DAngle[udg_UDex])
set udg_K2DX = x
set udg_K2DY = y
endif
endif
else
set udg_K2DX = x
set udg_K2DY = y
set udg_K2DFreeze[udg_UDex] = true
endif
endif
call SetUnitX(u, udg_K2DX)
call SetUnitY(u, udg_K2DY)
set udg_K2DLastX[udg_UDex] = udg_K2DX
set udg_K2DLastY[udg_UDex] = udg_K2DY
if udg_K2DFXModel[udg_UDex] != "" and not IsUnitType(u, UNIT_TYPE_FLYING) then
set udg_K2DFXTimeLeft[udg_UDex] = udg_K2DFXTimeLeft[udg_UDex] - udg_K2DTimeout
if udg_K2DFXTimeLeft[udg_UDex] <= 0.00 then
set udg_K2DFXTimeLeft[udg_UDex] = udg_K2DFXRate[udg_UDex]
call DestroyEffect(AddSpecialEffect(udg_K2DFXModel[udg_UDex], udg_K2DX, udg_K2DY))
endif
endif
if udg_K2DCollision[udg_UDex] >= 0.00 then
call GroupEnumUnitsInRange(bj_lastCreatedGroup, udg_K2DX, udg_K2DY, 200.00, null)
call GroupRemoveUnit(bj_lastCreatedGroup, u)
loop
set udg_Knockback2DUnit = FirstOfGroup(bj_lastCreatedGroup)
exitwhen udg_Knockback2DUnit == null
call GroupRemoveUnit(bj_lastCreatedGroup, udg_Knockback2DUnit)
if not IsUnitType(udg_Knockback2DUnit, UNIT_TYPE_STRUCTURE) and (IsUnitInRange(udg_Knockback2DUnit, u, udg_K2DCollision[udg_UDex])) and IsUnitAlly(udg_Knockback2DUnit, GetOwningPlayer(u)) and not IsUnitType(udg_Knockback2DUnit, UNIT_TYPE_DEAD) then
set udg_Knockback2DAngle = bj_RADTODEG * Atan2(GetUnitY(udg_Knockback2DUnit) - udg_K2DY, GetUnitX(udg_Knockback2DUnit) - udg_K2DX)
set udg_Knockback2DBounces = udg_K2DBounce[udg_UDex]
set udg_Knockback2DDistance = udg_K2DVelocity[udg_UDex] / udg_K2DTimeout * udg_K2DTimeLeft[udg_UDex]
if udg_K2DHeight[udg_UDex] != 0.00 then
set udg_Knockback2DHeight = GetUnitFlyHeight(u) - GetUnitDefaultFlyHeight(u)
endif
set udg_Knockback2DLoopFX = udg_K2DFXModel[udg_UDex]
set udg_Knockback2DTime = udg_K2DTimeLeft[udg_UDex]
call TriggerExecute(gg_trg_Knockback_2D)
endif
endloop
endif
set udg_K2DVelocity[udg_UDex] = udg_K2DVelocity[udg_UDex] - udg_K2DFriction[udg_UDex]
else
call TriggerExecute(gg_trg_Knockback_2D_Destroy)
endif
set udg_UDex = udg_K2DNext[udg_UDex]
endloop
set u = null
//Disable dummy after the loop finishes so it doesn't interfere with the map
call PauseUnit(udg_K2DDebrisKiller, true)
endfunction
//===========================================================================
function StartKnockback2DTimer takes nothing returns nothing
call TimerStart(udg_K2DTimer, udg_K2DTimeout, true, function Knockback2DLooper)
endfunction
function InitTrig_Knockback_2D_System takes nothing returns nothing
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Peridoc_Fade_BoolCheck1 takes nothing returns boolean
if (not(udg_DoFade[1] == true)) then
return false
endif
if (not(udg_VM_Trans > 0.00)) then
return false
endif
return true
endfunction
function Trig_Peridoc_Fade_BoolCheck2 takes nothing returns boolean
if (not(udg_DoFade[2] == true)) then
return false
endif
if (not(udg_hfoo_Red > 50)) then
return false
endif
return true
endfunction
function Trig_Peridoc_Fade_BoolCheck3 takes nothing returns boolean
if (not(udg_DoFade[3] == true)) then
return false
endif
if (not(udg_hfoo_Red < 100)) then
return false
endif
return true
endfunction
function Trig_Peridoc_Fade_BoolCheck5 takes nothing returns boolean
if (not(udg_DoFade[5] == true)) then
return false
endif
if (not(udg_Fog_Red < 100)) then
return false
endif
if (not(udg_Fog_Green < 100)) then
return false
endif
return true
endfunction
function Trig_Peridoc_Fade_BoolCheck4 takes nothing returns boolean
if (not(udg_DoFade[4] == true)) then
return false
endif
if (not(udg_hfoo_Red < 2)) then
return false
endif
return true
endfunction
function Trig_Peridoc_Fade_Actions takes nothing returns nothing
if Trig_Peridoc_Fade_BoolCheck1() then
set udg_VM_Trans = (udg_VM_Trans - 1.00)
call SetUnitVertexColorBJ(udg_VM, 100, 100, 100, udg_VM_Trans)
endif
if Trig_Peridoc_Fade_BoolCheck2() then
set udg_hfoo_Red = (udg_hfoo_Red - 1.00)
call SetUnitVertexColorBJ(gg_unit_hfoo_0013, udg_hfoo_Red, 10, 10, 0)
elseif Trig_Peridoc_Fade_BoolCheck3() then
set udg_hfoo_Red = (udg_hfoo_Red + 1.00)
call SetUnitVertexColorBJ(gg_unit_hfoo_0013, udg_hfoo_Red, 10, 10, 0)
endif
if Trig_Peridoc_Fade_BoolCheck4() then
set udg_DH_SpinSpeed = (udg_DH_SpinSpeed + 0.02)
call SetUnitTimeScale(udg_DH, udg_DH_SpinSpeed)
endif
if Trig_Peridoc_Fade_BoolCheck5() then
set udg_Fog_Green = (udg_Fog_Green + 0.2)
set udg_Fog_Red = (udg_Fog_Red + 0.2)
call SetTerrainFogEx(0, 0, 8000, 0.1, udg_Fog_Red * 0.01, udg_Fog_Green * 0.01, 1)
call SetFloatGameState(GAME_STATE_TIME_OF_DAY, udg_Fog_Red * 0.1)
endif
endfunction
//===========================================================================
function InitTrig_Peridoc_Fade takes nothing returns nothing
set gg_trg_Peridoc_Fade = CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_Peridoc_Fade, 0.02, true)
call TriggerAddAction(gg_trg_Peridoc_Fade, function Trig_Peridoc_Fade_Actions)
endfunction
//TESH.scrollpos=32
//TESH.alwaysfold=0
library MySnippets
//==========================//
// *hfoo Red Fade* //
//==========================//
function hfooAddRed takes nothing returns nothing
set udg_DoFade[2] = false
set udg_DoFade[3] = true
endfunction
function hfooSubRed takes nothing returns nothing
set udg_DoFade[3] = false
set udg_DoFade[2] = true
endfunction
function hfooFade takes nothing returns nothing
local timer array t
local integer i = 1
loop
exitwhen i > udg_hfooFadeHandler
set t[i] = CreateTimer()
call TimerStart(t[i], i, false, function hfooSubRed)
set t[i] = null
set i = i + 2
endloop
set i = 2
loop
exitwhen i > udg_hfooFadeHandler
set t[i] = CreateTimer()
call TimerStart(t[i], i, false, function hfooAddRed)
set t[i] = null
set i = i + 2
endloop
set udg_DoFade[3] = true
endfunction
//====================//
// *Credits* //
//====================//
function CreateCreditText takes string s, real size returns nothing
local real xvel = 0.081 * Cos(90 * bj_DEGTORAD)
local real yvel = 0.081 * Sin(90 * bj_DEGTORAD)
local texttag tt = CreateTextTag()
call SetTextTagText(tt, s, size * 0.0023)
call SetTextTagColor(tt, 255, 255, 255, 255)
call SetTextTagPos(tt, GetRectCenterX(gg_rct_33), GetRectCenterY(gg_rct_33), 0)
call SetTextTagVelocity(tt, xvel, yvel)
endfunction
endlibrary