• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Odd cause of fatal errors

Status
Not open for further replies.
I have 6 of these triggers that manipulate dummy abilities and provide a "rank" buff - it's purely ascetic.

When I have them disabled I don't get fatal errors, but if they are on I will get one around the second or third battle. I assume it's too much for WC3 to handle.

What's a more efficient way to do it?

  • Rank Orc Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Killing unit)) Not equal to (Owner of (Triggering unit))
    • Actions
      • Set RankUnit = (Killing unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Spell Book (Rank Orc Hero) for RankUnit) Equal to 1
          • (Level of Rank (Orc Hero) for RankUnit) Less than 26
        • Then - Actions
          • Unit - Increase level of Rank (Orc Hero) for RankUnit
        • Else - Actions
 
Level 10
Joined
Jul 12, 2009
Messages
318
What ability is the rank buff based on? Changing the level of some abilities (auras, maybe spell books) for a unit which is dead will crash WC3...could the killing unit be getting the kill based on delayed damage (eg. a traveling projectile) that hits after the killing unit itself has died?
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
you said 6 triggers?, then I suggest you use arrays for 'RankUnit' maybe it conflicts one another...just like 'Every 0 seconds of the game time'

do like this in each trigger...

Set RankUnit[1] = (Killing unit)
Set RankUnit[2] = (Killing unit)
Set RankUnit[3] = (Killing unit)
Set RankUnit[4] = (Killing unit)
Set RankUnit[5] = (Killing unit)
Set RankUnit[6] = (Killing unit)
 
Well I can use one trigger as well by simply combining them, but it still crashed.

I did not know about that auras could crash the game. It is a disabled spell book, so you don't have an ability icon, that contains a spell based on Trueshot. When the unit makes a kill, the level of the Trushot ability is increased and thus the buff changes.

What would I use instead that would be safe?
 
It is a disabled spell book, so you don't have an ability icon, that contains a spell based on Trueshot. When the unit makes a kill, the level of the Trueshot ability is increased and thus the buff changes.

As it stands I believe I've fixed it, the whole trigger is now as follows.

  • Rank
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
      • ((Triggering unit) is A structure) Equal to False
      • ((Killing unit) is alive) Equal to True
      • (Killing unit) Not equal to No unit
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of Spell Book (Rank Human Hero) for (Killing unit)) Equal to 1
          • (Level of Spell Book (Rank Human) for (Killing unit)) Equal to 1
          • (Level of Spell Book (Rank Neutral Hero) for (Killing unit)) Equal to 1
          • (Level of Spell Book (Rank Orc Hero) for (Killing unit)) Equal to 1
          • (Level of Spell Book (Rank Orc) for (Killing unit)) Equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Spell Book (Rank Orc) for (Killing unit)) Equal to 1
          • (Level of Rank (Orc) for (Killing unit)) Less than 26
        • Then - Actions
          • Unit - Increase level of Rank (Orc) for (Killing unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Spell Book (Rank Orc Hero) for (Killing unit)) Equal to 1
              • (Level of Rank (Orc Hero) for (Killing unit)) Less than 26
            • Then - Actions
              • Unit - Increase level of Rank (Orc Hero) for (Killing unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Spell Book (Rank Human) for (Killing unit)) Equal to 1
                  • (Level of Rank (Human) for (Killing unit)) Less than 26
                • Then - Actions
                  • Unit - Increase level of Rank (Human) for (Killing unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Arcane Lock (Rank Human Purifier) for (Killing unit)) Less than 26
                      • (Level of Arcane Lock (Rank Human Purifier) for (Killing unit)) Greater than 0
                    • Then - Actions
                      • Unit - Increase level of Arcane Lock (Rank Human Purifier) for (Killing unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Spell Book (Rank Human Hero) for (Killing unit)) Equal to 1
                          • (Level of Rank (Human Hero) for (Killing unit)) Less than 26
                        • Then - Actions
                          • Unit - Increase level of Rank (Human Hero) for (Killing unit)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Spell Book (Rank Neutral Hero) for (Killing unit)) Equal to 1
                              • (Level of Rank (Neutral Hero) for (Killing unit)) Less than 26
                            • Then - Actions
                              • Unit - Increase level of Rank (Neutral Hero) for (Killing unit)
                            • Else - Actions
 
Status
Not open for further replies.
Top