• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] End Cinematic freeze when it starts

Level 12
Joined
Aug 3, 2021
Messages
454
Hello it's Pekisa7. I recently merged my ending cinematic and a cinematic were King Gregory dies. And when I killed king Gregory to test the merged cinematics it freezes the map. So can you guys help me fix this? Here are the triggers:
  • End Cinematic
    • Events
      • Unit - Gregory the Wise 1158 <gen> Dies
    • Conditions
      • (Dying unit) Equal to LightBlueWarrior
    • Actions
      • Trigger - Turn off End Cinematic <gen>
      • Set InCinematic = True
      • Cinematic - Turn cinematic mode On for (All players)
      • Wait 2.00 seconds
      • Unit - Move Arthas_TheLichKing instantly to (Center of ArthasEndCinematic <gen>), facing (Center of DeadGregory <gen>)
      • Unit - Move LightBlueWarrior instantly to (Center of DeadGregory <gen>), facing (Center of ArthasEndCinematic <gen>)
      • Wait 2.00 seconds
      • Camera - Apply GregoryDies <gen> for Player 4 (Purple) over 0.00 seconds
      • Set DeadWarriorPosition = (Position of (Dying unit))
      • If (VictoryCinematic_Skipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Pause all units
      • Unit - Replace (Dying unit) with a Gregory the Wise using The new unit's default life and mana
      • Set LightBlueWarrior = (Last replaced unit)
      • Unit - Set life of LightBlueWarrior to 1.00
      • Game - Turn the day/night cycle Off
      • Unit - Pause LightBlueWarrior
      • Wait 0.10 seconds
      • Animation - Change LightBlueWarrior blend time to 0.00
      • Unit - Make LightBlueWarrior Invulnerable
      • Unit - Set life of LightBlueWarrior to 1.00
      • Animation - Play LightBlueWarrior's stand animation, using only Common animations
      • Sound - Set Animation and Spell Sounds to 0.00%
      • Wait 1.00 seconds
      • Sound - Set music volume to 100.00%
      • Sound - Play Tananana_nanana_Correct <gen>
      • Animation - Change LightBlueWarrior's animation speed to 10.00% of its original speed
      • Animation - Play LightBlueWarrior's stand slam animation, using only Common animations
      • Cinematic - Send transmission to (All players) from LightBlueWarrior named King Gregory the Wi...: Play I_can_t_belece_you_won_02 <gen> and display I can't beleve you..... Modify duration: Add 0.00 seconds and Don't wait
      • If (VictoryCinematic_Skipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 2.50 seconds
      • Animation - Change LightBlueWarrior blend time to 0.15
      • Wait 2.00 seconds
      • Sound - Reset all volume channels to 100%
      • Animation - Play LightBlueWarrior's death animation, using only Common animations
      • Wait for I_can_t_belece_you_won_02 <gen> to be 0.00 seconds from finished playing
      • If ((Arthas_TheLichKing is dead) Equal to False) then do (Cinematic - Send transmission to (All players) from Arthas_TheLichKing named The Lich King: Play The_truth_is_only_the_dead_have_senn_the_end_of_war <gen> and display The truth is. Only .... Modify duration: Add 0.00 seconds and Wait) else do (Do nothing)
      • If (VictoryCinematic_Skipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Animation - Change LightBlueWarrior's animation speed to 80.00% of its original speed
      • Sound - Stop music Immediately
      • Unit - Kill LightBlueWarrior
      • Unit - Unpause all units
      • Game - Turn the day/night cycle On
      • If (VictoryCinematic_Skipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 2.00 seconds
      • -------- Second Part --------
      • Cinematic - Fade in over 7.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 7.00 seconds
      • If (VictoryCinematic_Skipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Camera - Apply ArthasInTheThroneRoom <gen> for Player 4 (Purple) over 0.00 seconds
      • Wait 4.00 seconds
      • Cinematic - Send transmission to (All players) from Arthas_TheLichKing named The Lich King : Play The_throne_is_ours_my_warriors_Line <gen> and display The intruder is dea.... Modify duration: Add 0.00 seconds and Wait
      • Wait (Length of The_throne_is_ours_my_warriors_Line <gen>) seconds
      • If (VictoryCinematic_Skipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Order Arthas_TheLichKing to Move To (Center of ArthasSitsOnThrone <gen>)
      • Unit - Make Arthas_TheLichKing face (Center of ArthasEndCinematic <gen>) over 0.00 seconds
      • Animation - Play Arthas_TheLichKing's morph animation
      • Wait 4.00 seconds
      • Sound - Play Third_Version_Arthas_My_Son <gen>
      • Camera - Apply ArthasSitsOnThrone <gen> for Player 4 (Purple) over 0.00 seconds
      • Wait 7.00 seconds
      • Camera - Apply EndCamera01 <gen> for Player 4 (Purple) over 7.00 seconds
      • Wait 7.00 seconds
      • Camera - Apply EndCamera02 <gen> for Player 4 (Purple) over 7.00 seconds
      • Wait 7.00 seconds
      • Camera - Apply EndCamera03 <gen> for Player 4 (Purple) over 7.00 seconds
      • Wait 7.00 seconds
      • If (VictoryCinematic_Skipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Cinematic - Fade in over 7.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Sound - Stop music After fading
      • Set InCinematic = False
      • Cinematic - Turn cinematic mode Off for (All players)
      • If (VictoryCinematic_Skipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 7.00 seconds
      • Quest - Display to (All players) the Secret message: Thanks for playing ...
      • Wait 5.00 seconds
      • Game - Victory Player 4 (Purple) (Show dialogs, Show scores)
I can't send the video for some reason.
 
Last edited:
Is that trigger even starting? You have a specific unit event "Gregory the Wise 1158 <gen> Dies", but next you have condition that checks if dying unit is LightBlueWarrior. Is Gregory the LightBlueWarrior?

Apart from that, you can determine where the issue is based on which part of the trigger it crashes. If it crashes right when the trigger starts, i.e. before the first 2 second wait elapses, then there's just 3 actions that can cause the crash.
It could also be that you have left some other triggers turned on that start at the same time the End Cinematic starts and causes crash.
 
Is that trigger even starting? You have a specific unit event "Gregory the Wise 1158 <gen> Dies", but next you have condition that checks if dying unit is LightBlueWarrior. Is Gregory the LightBlueWarrior?

Apart from that, you can determine where the issue is based on which part of the trigger it crashes. If it crashes right when the trigger starts, i.e. before the first 2 second wait elapses, then there's just 3 actions that can cause the crash.
It could also be that you have left some other triggers turned on that start at the same time the End Cinematic starts and causes crash.
Fixed it somehow. I just put a cutstom script at the end and in my end cinematic setting trigger deleted unit group units in playable map are and do action and it worked.
 
Hello it's Pekisa7. I recently merged my ending cinematic and a cinematic were King Gregory dies. And when I killed king Gregory to test the merged cinematics it freezes the map. So can you guys help me fix this? Here are the triggers:
The reason the trigger froze is that you created an infinite loop.

You previously sent me a direct message asking for help with your map's AI.

However, to create the custom AI, several triggers need to be fixed first.

I can't send the video for some reason.


As you can see, not everything worked as expected.


I’ve developed a version with a lower chance of errors, and it has a more epic feel. I still need to finish adding a some details.

The triggers I used are these:

  • End Cinematic Step 01 Gregory Dies
    • Events
    • Conditions
    • Actions
      • Custom script: local trigger tt
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Event_UGDI_TU Equal to Gregory the Wise 1158 <gen>
        • Then - Actions
          • Custom script: set tt = GetTriggeringTrigger()
          • Custom script: call DestroyTrigger(tt)
          • Set CO_EndCinematic01 = GregoryDies <gen>
          • Set Point_EndCinematic01[0] = (Position of Arthas_TheLichKing)
          • Set Point_EndCinematic01[1] = (Position of LightBlueWarrior)
          • Set Point_EndCinematic01[2] = (Center of ArthasSitsOnThrone <gen>)
          • Set Sound_EndCinematic01_Speech[0] = I_can_t_believe <gen>
          • Set Sound_EndCinematic01_Speech[1] = you_won <gen>
          • Set Sound_EndCinematic01_Speech[2] = The_truth_is_only_the_dead_have_senn_the_end_of_war <gen>
          • Set Real_EndCinematic01_LS[0] = (Length of Sound_EndCinematic01_Speech[0])
          • Set Real_EndCinematic01_LS[1] = (Length of Sound_EndCinematic01_Speech[1])
          • Set Real_EndCinematic01_LS[2] = (Length of Sound_EndCinematic01_Speech[2])
          • Set UG_EndCinematic01 = (Units in EndMusic <gen>)
          • Set Trigger_EndCinematic01 = End Cinematic Step 02 Arthas Sits On The Throne <gen>
          • -------- Step 01 --------
          • Unit - Pause all units
          • Game - Turn the day/night cycle Off
          • Cinematic - Turn cinematic mode On for (All players) over 1.00 seconds
          • Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 1.00 seconds
          • Cinematic - Disable user control for (All players)
          • Camera - Apply CO_EndCinematic01 for Player 4 (Purple) over 1.00 seconds
          • Camera - Pan camera for Player 4 (Purple) to Point_EndCinematic01[0] over 1.00 seconds
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • Unit - Make Unit_EndCinematic_PU Invulnerable
              • Unit - Add Cargo Hold (Orc Burrow) to Unit_EndCinematic_PU
              • Animation - Change Unit_EndCinematic_PU's animation speed to 0.00% of its original speed
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Unit_EndCinematic_PU Not equal to LightBlueWarrior
                • Then - Actions
                  • Animation - Lock Unit_EndCinematic_PU's Chest to face LightBlueWarrior, offset by (0.00, 0.00, 90.00)
                  • Animation - Lock Unit_EndCinematic_PU's Head to face LightBlueWarrior, offset by (0.00, 0.00, 90.00)
                • Else - Actions
              • Set Unit_EndCinematic_PU = NoUnit
          • Animation - Lock LightBlueWarrior's Chest to face Arthas_TheLichKing, offset by (0.00, 0.00, 90.00)
          • Animation - Lock LightBlueWarrior's Head to face Arthas_TheLichKing, offset by (0.00, 0.00, 90.00)
          • Selection - Clear selection for Player 4 (Purple)
          • Sound - Set Ambient Sounds to 0.00%
          • Sound - Set Animation and Spell Sounds to 0.00%
          • Sound - Set Combat Sounds to 0.00%
          • Sound - Set Fire Sounds to 0.00%
          • Sound - Set Music to 100.00%
          • Sound - Set Unit Movement Sounds to 0.00%
          • Sound - Set Unit Response Sounds to 0.00%
          • Sound - Set User Interface Sounds to 0.00%
          • Sound - Set music volume to 100.00%
          • Wait 1.50 seconds
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • Animation - Change Unit_EndCinematic_PU's animation speed to 20.00% of its original speed
              • Set Unit_EndCinematic_PU = NoUnit
          • Camera - Rotate camera 180.00 degrees around Point_EndCinematic01[1] for Player 4 (Purple) over (1.00 + (Real_EndCinematic01_LS[0] + Real_EndCinematic01_LS[1])) seconds
          • Cinematic - Send transmission to (All players) from LightBlueWarrior named King Gregory the Wi...: Play No sound and display I can't believe...y.... Modify duration: Set to (2.00 + (Real_EndCinematic01_LS[0] + Real_EndCinematic01_LS[1])) seconds and Don't wait
          • Sound - Play Sound_EndCinematic01_Speech[0]
          • Wait (1.00 + Real_EndCinematic01_LS[0]) seconds
          • Sound - Play Sound_EndCinematic01_Speech[1]
          • Wait (1.00 + Real_EndCinematic01_LS[1]) seconds
          • -------- Step 02 --------
          • Animation - Play Arthas_TheLichKing's stand animation
          • Cinematic - Send transmission to (All players) from Arthas_TheLichKing named The Lich King: Play Sound_EndCinematic01_Speech[2] and display The truth is: only .... Modify duration: Set to (1.00 + Real_EndCinematic01_LS[2]) seconds and Don't wait
          • Wait (2.00 + Real_EndCinematic01_LS[2]) seconds
          • -------- Step 03 --------
          • Camera - Reset camera for Player 4 (Purple) to standard game-view over 4.00 seconds
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • Animation - Change Unit_EndCinematic_PU's animation speed to 100.00% of its original speed
              • Animation - Reset Unit_EndCinematic_PU's body-part facing
              • Set Unit_EndCinematic_PU = NoUnit
          • Wait 2.00 seconds
          • Cinematic - Apply a filter over 1.00 seconds using Normal blending on texture Black Mask, starting with color (100.00%, 100.00%, 100.00%) and 100.00% transparency and ending with color (0.00%, 0.00%, 0.00%) and 0.00% transparency
          • Selection - Add Arthas_TheLichKing to selection for Player 4 (Purple)
          • Unit - Set Arthas_TheLichKing movement speed to 200.00
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • Unit - Turn collision for Unit_EndCinematic_PU Off
              • Unit - Unpause Unit_EndCinematic_PU
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Unit_EndCinematic_PU Not equal to Arthas_TheLichKing
                  • Unit_EndCinematic_PU Not equal to LightBlueWarrior
                • Then - Actions
                  • Animation - Lock Unit_EndCinematic_PU's Chest to face Arthas_TheLichKing, offset by (0.00, 0.00, 90.00)
                  • Animation - Lock Unit_EndCinematic_PU's Head to face Arthas_TheLichKing, offset by (0.00, 0.00, 90.00)
                  • Unit - Set Unit_EndCinematic_PU movement speed to 100.00
                • Else - Actions
              • Unit - Order Unit_EndCinematic_PU to Move To Point_EndCinematic01[2]
              • Set Unit_EndCinematic_PU = NoUnit
          • Wait 0.10 seconds
          • Game - Turn the day/night cycle On
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Unit_EndCinematic_PU Not equal to Arthas_TheLichKing
                  • Unit_EndCinematic_PU Not equal to LightBlueWarrior
                • Then - Actions
                  • Unit - Order Unit_EndCinematic_PU to Stop
                  • Unit - Pause Unit_EndCinematic_PU
                • Else - Actions
              • Set Unit_EndCinematic_PU = NoUnit
          • Trigger - Turn on Trigger_EndCinematic01
          • -------- ---------- --------
          • Custom script: call RemoveLocation(udg_Point_EndCinematic01[0])
          • Custom script: call RemoveLocation(udg_Point_EndCinematic01[1])
          • Custom script: call RemoveLocation(udg_Point_EndCinematic01[2])
          • Sound - Destroy Sound_EndCinematic01_Speech[0]
          • Sound - Destroy Sound_EndCinematic01_Speech[1]
          • Sound - Destroy Sound_EndCinematic01_Speech[2]
          • Unit Group - Remove all units from UG_EndCinematic01
          • Custom script: call DestroyGroup(udg_UG_EndCinematic01)
          • Set CO_EndCinematic01 = NoCameraObject
          • Set Point_EndCinematic01[0] = NoPoint
          • Set Point_EndCinematic01[1] = NoPoint
          • Set Point_EndCinematic01[2] = NoPoint
          • Set Sound_EndCinematic01_Speech[0] = NoSound
          • Set Sound_EndCinematic01_Speech[1] = NoSound
          • Set Sound_EndCinematic01_Speech[2] = NoSound
          • Set Trigger_EndCinematic01 = NoTrigger
          • Set UG_EndCinematic01 = NoUnitGroup
          • Custom script: set tt = null
        • Else - Actions

  • End Cinematic Step 02 Arthas Sits On The Throne
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Custom script: local trigger tt
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ArthasSitsOnThrone <gen> contains Arthas_TheLichKing) Equal to True
        • Then - Actions
          • Custom script: set tt = GetTriggeringTrigger()
          • Custom script: call DestroyTrigger(tt)
          • Set CO_EndCinematic02[0] = ArthasSitsOnThrone Copy <gen>
          • Set CO_EndCinematic02[1] = ArthasSitsOnThrone <gen>
          • Set Point_EndCinematic02[0] = (Center of ArthasSitsOnThrone <gen>)
          • Set Point_EndCinematic02[1] = (Position of Arthas_TheLichKing)
          • Set Sound_EndCinematic02_Speech[0] = The_throne_is_ours_my_warriors_Line <gen>
          • Set Real_EndCinematic02_LS[0] = (Length of Sound_EndCinematic02_Speech[0])
          • -------- Step 01 --------
          • Unit - Pause Arthas_TheLichKing
          • Wait 2.00 seconds
          • -------- Step 02 --------
          • Camera - Apply CO_EndCinematic02[0] for Player 4 (Purple) over 0.00 seconds
          • Unit - Move Arthas_TheLichKing instantly to Point_EndCinematic02[0], facing 270.00 degrees
          • Camera - Pan camera for Player 4 (Purple) to Point_EndCinematic02[1] over 0.00 seconds
          • Animation - Play Arthas_TheLichKing's stand alternate animation
          • Environment - Create at Region_PMA the weather effect Dungeon Blue Fog (Heavy)
          • Set WE_EndCinematic02[0] = (Last created weather effect)
          • Environment - Turn WE_EndCinematic02[0] On
          • Environment - Create at Region_PMA the weather effect Northrend Blizzard
          • Set WE_EndCinematic02[1] = (Last created weather effect)
          • Environment - Turn WE_EndCinematic02[1] On
          • Wait 1.00 seconds
          • -------- Step 03 --------
          • Sound - Stop music After fading
          • Sound - Play Third_Version_Arthas_My_Son <gen>
          • Cinematic - Apply a filter over 2.00 seconds using Normal blending on texture Black Mask, starting with color (0.00%, 0.00%, 0.00%) and 0.00% transparency and ending with color (100.00%, 100.00%, 100.00%) and 100.00% transparency
          • Wait 4.00 seconds
          • -------- Step 04 --------
          • Cinematic - Send transmission to (All players) from Arthas_TheLichKing named The Lich King : Play Sound_EndCinematic02_Speech[0] and display The intruder is dea.... Modify duration: Set to (1.00 + Real_EndCinematic02_LS[0]) seconds and Don't wait
          • Wait (1.00 + Real_EndCinematic02_LS[0]) seconds
          • Camera - Apply CO_EndCinematic02[1] for Player 4 (Purple) over 2.00 seconds
          • Camera - Pan camera for Player 4 (Purple) to Point_EndCinematic02[1] over 2.00 seconds
          • Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 1.00 seconds
          • Cinematic - Turn cinematic mode Off for (All players) over 1.00 seconds
          • -------- ---------- --------
          • Custom script: call RemoveLocation(udg_Point_EndCinematic02[0])
          • Custom script: call RemoveLocation(udg_Point_EndCinematic02[1])
          • Set CO_EndCinematic02[0] = NoCameraObject
          • Set CO_EndCinematic02[1] = NoCameraObject
          • Set Point_EndCinematic02[0] = NoPoint
          • Set Point_EndCinematic02[1] = NoPoint
          • Set Sound_EndCinematic02_Speech[0] = NoSound
          • Set WE_EndCinematic02[0] = NoWeatherEffect
          • Set WE_EndCinematic02[1] = NoWeatherEffect
          • Custom script: set tt = null
        • Else - Actions

To run the first trigger, I created a universal trigger to detect when a unit dies.

  • Event Unit Generic Dies
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Event_UGDI_KU = (Killing unit)
      • Set Event_UGDI_TU = (Triggering unit)
      • Set Event_UGDI_OwnerKU = (Owner of Event_UGDI_KU)
      • Set Event_UGDI_OwnerTU = (Owner of Event_UGDI_TU)
      • Set Event_UGDI_IDOwnerKU = (Player number of Event_UGDI_OwnerKU)
      • Set Event_UGDI_IDOwnerTU = (Player number of Event_UGDI_OwnerTU)
      • Set Event_UGDI_PointKU = (Position of Event_UGDI_KU)
      • Set Event_UGDI_PointTU = (Position of Event_UGDI_TU)
      • For each (Integer Event_UGDI_LoopTrigger) from 0 to 1, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Event_UGDI_TriggerArray[Event_UGDI_LoopTrigger] Not equal to NoTrigger
            • Then - Actions
              • Trigger - Run Event_UGDI_TriggerArray[Event_UGDI_LoopTrigger] (ignoring conditions)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_Event_UGDI_PointKU)
      • Custom script: call RemoveLocation(udg_Event_UGDI_PointTU)
      • Set Event_UGDI_KU = NoUnit
      • Set Event_UGDI_TU = NoUnit
      • Set Event_UGDI_OwnerKU = NoPlayer
      • Set Event_UGDI_OwnerTU = NoPlayer
      • Set Event_UGDI_PointKU = NoPoint
      • Set Event_UGDI_PointTU = NoPoint

That’s what I meant by "using a trigger as a function."
 
The reason the trigger froze is that you created an infinite loop.

You previously sent me a direct message asking for help with your map's AI.

However, to create the custom AI, several triggers need to be fixed first.




As you can see, not everything worked as expected.


I’ve developed a version with a lower chance of errors, and it has a more epic feel. I still need to finish adding a some details.

The triggers I used are these:

  • End Cinematic Step 01 Gregory Dies
    • Events
    • Conditions
    • Actions
      • Custom script: local trigger tt
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Event_UGDI_TU Equal to Gregory the Wise 1158 <gen>
        • Then - Actions
          • Custom script: set tt = GetTriggeringTrigger()
          • Custom script: call DestroyTrigger(tt)
          • Set CO_EndCinematic01 = GregoryDies <gen>
          • Set Point_EndCinematic01[0] = (Position of Arthas_TheLichKing)
          • Set Point_EndCinematic01[1] = (Position of LightBlueWarrior)
          • Set Point_EndCinematic01[2] = (Center of ArthasSitsOnThrone <gen>)
          • Set Sound_EndCinematic01_Speech[0] = I_can_t_believe <gen>
          • Set Sound_EndCinematic01_Speech[1] = you_won <gen>
          • Set Sound_EndCinematic01_Speech[2] = The_truth_is_only_the_dead_have_senn_the_end_of_war <gen>
          • Set Real_EndCinematic01_LS[0] = (Length of Sound_EndCinematic01_Speech[0])
          • Set Real_EndCinematic01_LS[1] = (Length of Sound_EndCinematic01_Speech[1])
          • Set Real_EndCinematic01_LS[2] = (Length of Sound_EndCinematic01_Speech[2])
          • Set UG_EndCinematic01 = (Units in EndMusic <gen>)
          • Set Trigger_EndCinematic01 = End Cinematic Step 02 Arthas Sits On The Throne <gen>
          • -------- Step 01 --------
          • Unit - Pause all units
          • Game - Turn the day/night cycle Off
          • Cinematic - Turn cinematic mode On for (All players) over 1.00 seconds
          • Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 1.00 seconds
          • Cinematic - Disable user control for (All players)
          • Camera - Apply CO_EndCinematic01 for Player 4 (Purple) over 1.00 seconds
          • Camera - Pan camera for Player 4 (Purple) to Point_EndCinematic01[0] over 1.00 seconds
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • Unit - Make Unit_EndCinematic_PU Invulnerable
              • Unit - Add Cargo Hold (Orc Burrow) to Unit_EndCinematic_PU
              • Animation - Change Unit_EndCinematic_PU's animation speed to 0.00% of its original speed
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Unit_EndCinematic_PU Not equal to LightBlueWarrior
                • Then - Actions
                  • Animation - Lock Unit_EndCinematic_PU's Chest to face LightBlueWarrior, offset by (0.00, 0.00, 90.00)
                  • Animation - Lock Unit_EndCinematic_PU's Head to face LightBlueWarrior, offset by (0.00, 0.00, 90.00)
                • Else - Actions
              • Set Unit_EndCinematic_PU = NoUnit
          • Animation - Lock LightBlueWarrior's Chest to face Arthas_TheLichKing, offset by (0.00, 0.00, 90.00)
          • Animation - Lock LightBlueWarrior's Head to face Arthas_TheLichKing, offset by (0.00, 0.00, 90.00)
          • Selection - Clear selection for Player 4 (Purple)
          • Sound - Set Ambient Sounds to 0.00%
          • Sound - Set Animation and Spell Sounds to 0.00%
          • Sound - Set Combat Sounds to 0.00%
          • Sound - Set Fire Sounds to 0.00%
          • Sound - Set Music to 100.00%
          • Sound - Set Unit Movement Sounds to 0.00%
          • Sound - Set Unit Response Sounds to 0.00%
          • Sound - Set User Interface Sounds to 0.00%
          • Sound - Set music volume to 100.00%
          • Wait 1.50 seconds
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • Animation - Change Unit_EndCinematic_PU's animation speed to 20.00% of its original speed
              • Set Unit_EndCinematic_PU = NoUnit
          • Camera - Rotate camera 180.00 degrees around Point_EndCinematic01[1] for Player 4 (Purple) over (1.00 + (Real_EndCinematic01_LS[0] + Real_EndCinematic01_LS[1])) seconds
          • Cinematic - Send transmission to (All players) from LightBlueWarrior named King Gregory the Wi...: Play No sound and display I can't believe...y.... Modify duration: Set to (2.00 + (Real_EndCinematic01_LS[0] + Real_EndCinematic01_LS[1])) seconds and Don't wait
          • Sound - Play Sound_EndCinematic01_Speech[0]
          • Wait (1.00 + Real_EndCinematic01_LS[0]) seconds
          • Sound - Play Sound_EndCinematic01_Speech[1]
          • Wait (1.00 + Real_EndCinematic01_LS[1]) seconds
          • -------- Step 02 --------
          • Animation - Play Arthas_TheLichKing's stand animation
          • Cinematic - Send transmission to (All players) from Arthas_TheLichKing named The Lich King: Play Sound_EndCinematic01_Speech[2] and display The truth is: only .... Modify duration: Set to (1.00 + Real_EndCinematic01_LS[2]) seconds and Don't wait
          • Wait (2.00 + Real_EndCinematic01_LS[2]) seconds
          • -------- Step 03 --------
          • Camera - Reset camera for Player 4 (Purple) to standard game-view over 4.00 seconds
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • Animation - Change Unit_EndCinematic_PU's animation speed to 100.00% of its original speed
              • Animation - Reset Unit_EndCinematic_PU's body-part facing
              • Set Unit_EndCinematic_PU = NoUnit
          • Wait 2.00 seconds
          • Cinematic - Apply a filter over 1.00 seconds using Normal blending on texture Black Mask, starting with color (100.00%, 100.00%, 100.00%) and 100.00% transparency and ending with color (0.00%, 0.00%, 0.00%) and 0.00% transparency
          • Selection - Add Arthas_TheLichKing to selection for Player 4 (Purple)
          • Unit - Set Arthas_TheLichKing movement speed to 200.00
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • Unit - Turn collision for Unit_EndCinematic_PU Off
              • Unit - Unpause Unit_EndCinematic_PU
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Unit_EndCinematic_PU Not equal to Arthas_TheLichKing
                  • Unit_EndCinematic_PU Not equal to LightBlueWarrior
                • Then - Actions
                  • Animation - Lock Unit_EndCinematic_PU's Chest to face Arthas_TheLichKing, offset by (0.00, 0.00, 90.00)
                  • Animation - Lock Unit_EndCinematic_PU's Head to face Arthas_TheLichKing, offset by (0.00, 0.00, 90.00)
                  • Unit - Set Unit_EndCinematic_PU movement speed to 100.00
                • Else - Actions
              • Unit - Order Unit_EndCinematic_PU to Move To Point_EndCinematic01[2]
              • Set Unit_EndCinematic_PU = NoUnit
          • Wait 0.10 seconds
          • Game - Turn the day/night cycle On
          • Unit Group - Pick every unit in UG_EndCinematic01 and do (Actions)
            • Loop - Actions
              • Set Unit_EndCinematic_PU = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Unit_EndCinematic_PU Not equal to Arthas_TheLichKing
                  • Unit_EndCinematic_PU Not equal to LightBlueWarrior
                • Then - Actions
                  • Unit - Order Unit_EndCinematic_PU to Stop
                  • Unit - Pause Unit_EndCinematic_PU
                • Else - Actions
              • Set Unit_EndCinematic_PU = NoUnit
          • Trigger - Turn on Trigger_EndCinematic01
          • -------- ---------- --------
          • Custom script: call RemoveLocation(udg_Point_EndCinematic01[0])
          • Custom script: call RemoveLocation(udg_Point_EndCinematic01[1])
          • Custom script: call RemoveLocation(udg_Point_EndCinematic01[2])
          • Sound - Destroy Sound_EndCinematic01_Speech[0]
          • Sound - Destroy Sound_EndCinematic01_Speech[1]
          • Sound - Destroy Sound_EndCinematic01_Speech[2]
          • Unit Group - Remove all units from UG_EndCinematic01
          • Custom script: call DestroyGroup(udg_UG_EndCinematic01)
          • Set CO_EndCinematic01 = NoCameraObject
          • Set Point_EndCinematic01[0] = NoPoint
          • Set Point_EndCinematic01[1] = NoPoint
          • Set Point_EndCinematic01[2] = NoPoint
          • Set Sound_EndCinematic01_Speech[0] = NoSound
          • Set Sound_EndCinematic01_Speech[1] = NoSound
          • Set Sound_EndCinematic01_Speech[2] = NoSound
          • Set Trigger_EndCinematic01 = NoTrigger
          • Set UG_EndCinematic01 = NoUnitGroup
          • Custom script: set tt = null
        • Else - Actions

  • End Cinematic Step 02 Arthas Sits On The Throne
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Custom script: local trigger tt
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ArthasSitsOnThrone <gen> contains Arthas_TheLichKing) Equal to True
        • Then - Actions
          • Custom script: set tt = GetTriggeringTrigger()
          • Custom script: call DestroyTrigger(tt)
          • Set CO_EndCinematic02[0] = ArthasSitsOnThrone Copy <gen>
          • Set CO_EndCinematic02[1] = ArthasSitsOnThrone <gen>
          • Set Point_EndCinematic02[0] = (Center of ArthasSitsOnThrone <gen>)
          • Set Point_EndCinematic02[1] = (Position of Arthas_TheLichKing)
          • Set Sound_EndCinematic02_Speech[0] = The_throne_is_ours_my_warriors_Line <gen>
          • Set Real_EndCinematic02_LS[0] = (Length of Sound_EndCinematic02_Speech[0])
          • -------- Step 01 --------
          • Unit - Pause Arthas_TheLichKing
          • Wait 2.00 seconds
          • -------- Step 02 --------
          • Camera - Apply CO_EndCinematic02[0] for Player 4 (Purple) over 0.00 seconds
          • Unit - Move Arthas_TheLichKing instantly to Point_EndCinematic02[0], facing 270.00 degrees
          • Camera - Pan camera for Player 4 (Purple) to Point_EndCinematic02[1] over 0.00 seconds
          • Animation - Play Arthas_TheLichKing's stand alternate animation
          • Environment - Create at Region_PMA the weather effect Dungeon Blue Fog (Heavy)
          • Set WE_EndCinematic02[0] = (Last created weather effect)
          • Environment - Turn WE_EndCinematic02[0] On
          • Environment - Create at Region_PMA the weather effect Northrend Blizzard
          • Set WE_EndCinematic02[1] = (Last created weather effect)
          • Environment - Turn WE_EndCinematic02[1] On
          • Wait 1.00 seconds
          • -------- Step 03 --------
          • Sound - Stop music After fading
          • Sound - Play Third_Version_Arthas_My_Son <gen>
          • Cinematic - Apply a filter over 2.00 seconds using Normal blending on texture Black Mask, starting with color (0.00%, 0.00%, 0.00%) and 0.00% transparency and ending with color (100.00%, 100.00%, 100.00%) and 100.00% transparency
          • Wait 4.00 seconds
          • -------- Step 04 --------
          • Cinematic - Send transmission to (All players) from Arthas_TheLichKing named The Lich King : Play Sound_EndCinematic02_Speech[0] and display The intruder is dea.... Modify duration: Set to (1.00 + Real_EndCinematic02_LS[0]) seconds and Don't wait
          • Wait (1.00 + Real_EndCinematic02_LS[0]) seconds
          • Camera - Apply CO_EndCinematic02[1] for Player 4 (Purple) over 2.00 seconds
          • Camera - Pan camera for Player 4 (Purple) to Point_EndCinematic02[1] over 2.00 seconds
          • Cinematic - Turn off letterbox mode (show interface) for (All players): fade in over 1.00 seconds
          • Cinematic - Turn cinematic mode Off for (All players) over 1.00 seconds
          • -------- ---------- --------
          • Custom script: call RemoveLocation(udg_Point_EndCinematic02[0])
          • Custom script: call RemoveLocation(udg_Point_EndCinematic02[1])
          • Set CO_EndCinematic02[0] = NoCameraObject
          • Set CO_EndCinematic02[1] = NoCameraObject
          • Set Point_EndCinematic02[0] = NoPoint
          • Set Point_EndCinematic02[1] = NoPoint
          • Set Sound_EndCinematic02_Speech[0] = NoSound
          • Set WE_EndCinematic02[0] = NoWeatherEffect
          • Set WE_EndCinematic02[1] = NoWeatherEffect
          • Custom script: set tt = null
        • Else - Actions

To run the first trigger, I created a universal trigger to detect when a unit dies.

  • Event Unit Generic Dies
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Event_UGDI_KU = (Killing unit)
      • Set Event_UGDI_TU = (Triggering unit)
      • Set Event_UGDI_OwnerKU = (Owner of Event_UGDI_KU)
      • Set Event_UGDI_OwnerTU = (Owner of Event_UGDI_TU)
      • Set Event_UGDI_IDOwnerKU = (Player number of Event_UGDI_OwnerKU)
      • Set Event_UGDI_IDOwnerTU = (Player number of Event_UGDI_OwnerTU)
      • Set Event_UGDI_PointKU = (Position of Event_UGDI_KU)
      • Set Event_UGDI_PointTU = (Position of Event_UGDI_TU)
      • For each (Integer Event_UGDI_LoopTrigger) from 0 to 1, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Event_UGDI_TriggerArray[Event_UGDI_LoopTrigger] Not equal to NoTrigger
            • Then - Actions
              • Trigger - Run Event_UGDI_TriggerArray[Event_UGDI_LoopTrigger] (ignoring conditions)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_Event_UGDI_PointKU)
      • Custom script: call RemoveLocation(udg_Event_UGDI_PointTU)
      • Set Event_UGDI_KU = NoUnit
      • Set Event_UGDI_TU = NoUnit
      • Set Event_UGDI_OwnerKU = NoPlayer
      • Set Event_UGDI_OwnerTU = NoPlayer
      • Set Event_UGDI_PointKU = NoPoint
      • Set Event_UGDI_PointTU = NoPoint

That’s what I meant by "using a trigger as a function."
Hey O_Vazio. Thanks for trying to help with this. But I already fixed it. How's a going with the AI I sent you?
 
Back
Top