• 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.

Crashing Trigger

Status
Not open for further replies.
This is a trigger that causes a crashe in my game The Last Blade
This is a trigger that works at the end of a battle it has to pauses units check the winner, give bounty, call the trigger that will moves the heroes and unpause every units

  • Duel Timer End
    • Evénements
      • Temps - BastonTimer1 expires
    • Conditions
    • Actions
      • Déclencheur - Turn off (This trigger)
      • Déclencheur - Turn off Duel Kill <gen>
      • Partie - Display to (All players) for 10.00 seconds the text: |cff1cb619END OF TH...
      • Set Jeu = Arene Collision <gen>
      • Set EVENT = TRUE
      • Compte Ã* rebours - Pause BastonTimer1
      • Compte Ã* rebours - Destroy BastonTimerWindow1
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • ArchimondeBol Egal Ã* FALSE
        • Alors - Actions
          • Compte Ã* rebours - Reprendre ArchimondeTimer
        • Sinon - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • MidBossBol Egal Ã* FALSE
        • Alors - Actions
          • Compte Ã* rebours - Reprendre MidBossTimer
        • Sinon - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • MagBol Egal Ã* FALSE
        • Alors - Actions
          • Compte Ã* rebours - Reprendre MagTimer
        • Sinon - Actions
      • Set BastonHP1 = 0.00
      • Set BastonHP2 = 0.00
      • Groupe unité - Pick every unit in BastonGroupe2 and do (Actions)
        • Boucle - Actions
          • Unité - Pause (Picked unit)
          • Set BastonHP2 = (BastonHP2 + (Percentage life of (Picked unit)))
      • Groupe unité - Pick every unit in BastonGroupe1 and do (Actions)
        • Boucle - Actions
          • Unité - Pause (Picked unit)
          • Set BastonHP1 = (BastonHP1 + (Percentage life of (Picked unit)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • BastonHP1 Egal Ã* BastonHP2
        • Alors - Actions
          • Partie - Display to (All players) for 30.00 seconds the text: (|cff1cb619No Winner : + ((String((Integer(BastonHP1)))) + % Hp in each team|r))
          • For each (Integer A) from 1 to 12, do (Actions)
            • Boucle - Actions
              • Joueur - Add 200 to (Player((Integer A))) Or actuel
              • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 200)
              • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 200)
        • Sinon - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si - Conditions
              • BastonHP1 Supérieur Ã* BastonHP2
            • Alors - Actions
              • For each (Integer A) from 1 to 6, do (Actions)
                • Boucle - Actions
                  • Joueur - Add 400 to (Player((Integer A))) Or actuel
                  • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 400)
                  • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 400)
              • Partie - Display to (All players) for 30.00 seconds the text: (|cff1cb619The Obsidians Won : + ((String((Integer(BastonHP1)))) + (% against + ((String((Integer(BastonHP2)))) + % Hp!!!!!|r))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • BastonHP2 Egal Ã* 0.00
                • Alors - Actions
                  • Set BastonSurvivor = 0
                  • Groupe unité - Pick every unit in BastonGroupe1 and do (Actions)
                    • Boucle - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • Si - Conditions
                          • ((Picked unit) is alive) Egal Ã* TRUE
                        • Alors - Actions
                          • Set BastonSurvivor = (BastonSurvivor + 1)
                        • Sinon - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Si - Conditions
                      • BastonSurvivor Egal Ã* BastonMaxRd
                    • Alors - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • Si - Conditions
                          • BastonHP1 Egal Ã* (100.00 x (Real(BastonMaxRd)))
                        • Alors - Actions
                          • Partie - Display to (All players) for 20.00 seconds the text: |cff1cb619PERFECT!!...
                          • For each (Integer A) from 1 to 6, do (Actions)
                            • Boucle - Actions
                              • Joueur - Add 600 to (Player((Integer A))) Or actuel
                              • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 600)
                              • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 600)
                        • Sinon - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si - Conditions
                              • BastonMaxRd Différent de 1
                            • Alors - Actions
                              • Partie - Display to (All players) for 20.00 seconds the text: |cff1cb619The Obsid...
                              • For each (Integer A) from 1 to 6, do (Actions)
                                • Boucle - Actions
                                  • Joueur - Add 400 to (Player((Integer A))) Or actuel
                                  • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 400)
                                  • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 400)
                            • Sinon - Actions
                    • Sinon - Actions
                      • Partie - Display to (All players) for 20.00 seconds the text: |cff1cb619The Obsid...
                      • For each (Integer A) from 1 to 6, do (Actions)
                        • Boucle - Actions
                          • Joueur - Add 300 to (Player((Integer A))) Or actuel
                          • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 300)
                          • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 300)
                • Sinon - Actions
            • Sinon - Actions
              • For each (Integer A) from 7 to 12, do (Actions)
                • Boucle - Actions
                  • Joueur - Add 400 to (Player((Integer A))) Or actuel
                  • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 400)
                  • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 400)
              • Partie - Display to (All players) for 30.00 seconds the text: (|cff1cb619The Nerubians Won : + ((String((Integer(BastonHP2)))) + (% against + ((String((Integer(BastonHP1)))) + % Hp!!!!!|r))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • BastonHP1 Egal Ã* 0.00
                • Alors - Actions
                  • Set BastonSurvivor = 0
                  • Groupe unité - Pick every unit in BastonGroupe2 and do (Actions)
                    • Boucle - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • Si - Conditions
                          • ((Picked unit) is alive) Egal Ã* TRUE
                        • Alors - Actions
                          • Set BastonSurvivor = (BastonSurvivor + 1)
                        • Sinon - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Si - Conditions
                      • BastonSurvivor Egal Ã* BastonMaxRd
                    • Alors - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • Si - Conditions
                          • BastonHP2 Egal Ã* (100.00 x (Real(BastonMaxRd)))
                        • Alors - Actions
                          • Partie - Display to (All players) for 20.00 seconds the text: |cff1cb619PERFECT!!...
                          • For each (Integer A) from 7 to 12, do (Actions)
                            • Boucle - Actions
                              • Joueur - Add 600 to (Player((Integer A))) Or actuel
                              • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 600)
                              • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 600)
                        • Sinon - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si - Conditions
                              • BastonMaxRd Différent de 1
                            • Alors - Actions
                              • Partie - Display to (All players) for 20.00 seconds the text: |cff1cb619The Nerub...
                              • For each (Integer A) from 7 to 12, do (Actions)
                                • Boucle - Actions
                                  • Joueur - Add 400 to (Player((Integer A))) Or actuel
                                  • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 400)
                                  • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 400)
                            • Sinon - Actions
                    • Sinon - Actions
                      • Partie - Display to (All players) for 20.00 seconds the text: |cff1cb619The Nerub...
                      • For each (Integer A) from 7 to 12, do (Actions)
                        • Boucle - Actions
                          • Joueur - Add 300 to (Player((Integer A))) Or actuel
                          • Set GoldEvent[(Integer A)] = (GoldEvent[(Integer A)] + 300)
                          • Set GoldTotal[(Integer A)] = (GoldTotal[(Integer A)] + 300)
                • Sinon - Actions
      • Wait 3.00 seconds
      • For each (Integer A) from 1 to 12, do (Actions)
        • Boucle - Actions
          • Héros - Activer experience gain for Hero[(Integer A)]
      • Déclencheur - Turn on Mort <gen>
      • Déclencheur - Run Situation Repick <gen> (checking conditions)
      • For each (Integer A) from 1 to 12, do (Actions)
        • Boucle - Actions
          • Sélection - Select Hero[(Integer A)] for (Owner of Hero[(Integer A)])
          • Set BastonPointHero = (Position of Hero[(Integer A)])
          • Caméra - Pan camera for (Owner of Hero[(Integer A)]) to BastonPointHero over 0.00 seconds
          • Custom script: call RemoveLocation (udg_BastonPointHero)
          • Unité - Make Hero[(Integer A)] Vulnérable
      • Unité - Reprendre all units
      • Groupe unité - Pick every unit in GoGroupe and do (Actions)
        • Boucle - Actions
          • Unité - Pause (Picked unit)
      • For each (Integer A) from 1 to 12, do (Actions)
        • Boucle - Actions
          • Visibilité - Disable BastonVisibilite[(Integer A)]
      • Custom script: call DestroyGroup( udg_BastonGroupe2)
      • Custom script: call DestroyGroup( udg_BastonGroupe1)
      • Déclencheur - Run Baston Timer Create <gen> (checking conditions)
      • Set EVENT = FALSE
      • Set CreepSpawn = TRUE
Variables definition:
BastonGroupe1 - Group - Group with selected heroes from the team 1
BastonGroupe2 - Group - Group with selected heroes from the team 2
Hero[X] - Unit - Hero controlled by the player X
GoldTotal[X] - integer - gold Obtained in the game by the player X
GoldEvent[X] - integer - gold Obtained during the events by the player X
BastonPointHero - Location - Hero Location
EVENT - Boolean - A variable to let the game know when there is an event
CreepSpawn - Boolean - A variable to unlock the creep spawning in the arena
BastonMaxRd - Integer - The random number of unit that will fight for the event
BastonVisibilite[X] - Visibility - The visibility across the battle arena during the event for the player X
BastonHP1 - Real - Total HP percentage of selected heroes in the team 1 (BastonGroupe1)
BastonHP2 - Real - Total HP percentage of selected heroes in the team 2 (BastonGroupe2)
BastonSurvivor - Integer - Count living unit in each selected event groups (BastonGroupe1, BastonGroupe2)
GoGroupe - Groupe - A Group with bosses, this is used to pause all of them
BastonTimer1 - Timer - Counts the battle duration
BastonTimerWindow1 - Timer Window - TImer window of the last presented timer

MagTimer - Timer - Counts before the Magtheridon event
MidBossTimer - Timer - Counts before the Magtheridon event
ArchimondeTimer - Timer - Counts before the Mathog event

Jeu - Region - Region of the battle arean
 
Last edited:
Status
Not open for further replies.
Top