Trigger Crashing My Map

BarzahdX

Active Member
Reaction score
18
I don't know why, on my old computer(an XP,) this trigger worked properly. Now on my new computer(Windows 7,) the game crashes when it triggers. I know it's a little poorly done or may appear sloppy, but it gets the job done.

Here's the trigger:

Trigger:
  • Spirit Bond Damage
    • Events
      • (Unit - Hero[5] Takes damage)
      • (Unit - Hero[6] Takes damage)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero[5] has buff Spirit Bond ) Equal to True
          • (Hero[6] has buff Spirit Bond ) Equal to True
          • (Triggering unit) Equal to Hero[5]
        • Then - Actions
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) / 2.00))
          • Unit - Cause (Damage source) to damage Hero[6], dealing ((Damage taken) / 2.00) damage of attack type Hero and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero[5] has buff Spirit Bond ) Equal to True
          • (Hero[6] has buff Spirit Bond ) Equal to True
          • (Triggering unit) Equal to Hero[6]
        • Then - Actions
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) / 2.00))
          • Unit - Cause (Damage source) to damage Hero[5], dealing ((Damage taken) / 2.00) damage of attack type Hero and damage type Normal
        • Else - Actions


I'll need to test it again to see if it still works on my old computer, it's been awhile. I have WC3 running in compatibility mode of XP(Service Pack 3.)
 
Thats because the trigger loops forever. The damage is dealt back and fort for both heroes since they have some sort of return damage. Once Hero 5 damages hero 6 the return damage kicks in and Hero 6 counter damages hero 5, in an instance hero 5 will return the returned damage as well, it goes bac kand fort and it will go forever causing a crash.
 
Hahahah! Duh! I totally missed that, lol. Thank you. :) How should I remedy this?
 
split it into 2 triggers can turn off and on at the right points
Meaning: before damage done turn off the other
after damaged done turn on the other
 
I have a better idea, gimme a sec to change it. I'll edit this post.

EDIT:
Trigger:
  • Spirit Bond Damage
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero[5] has buff Spirit Bond ) Equal to True
          • (Hero[6] has buff Spirit Bond ) Equal to True
          • (Triggering unit) Equal to Hero[5]
        • Then - Actions
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) / 2.00))
          • Unit - Set life of Hero[6] to ((Life of Hero[6]) - ((Damage taken) / 2.00))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero[5] has buff Spirit Bond ) Equal to True
          • (Hero[6] has buff Spirit Bond ) Equal to True
          • (Triggering unit) Equal to Hero[6]
        • Then - Actions
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) / 2.00))
          • Unit - Set life of Hero[5] to ((Life of Hero[5]) - ((Damage taken) / 2.00))
        • Else - Actions


Bam. It's even better this way because now there won't be double armor stacking--an error on my part.
 
Though once the damage is greater than the remaining life of the damager there would be no killer.
 
Calculate the damage first, if the damage is equal to or greater than the target's current HP,
Cause SomeUnit to damage SomeTarget for 99999999.00 damage <-- Lol, sth like that? o.0
 
The most simple solution for a damage return against damage return in GUI is to create a dummy, instead of the Hero dealing the damage use the dummy. As for the trigger that returns the damage add a condition that the damage source is not equal to unit type dummy. That way the damage won't circulate. And by the way, try to search the tutorials and resources section for the GDD system, would help you much for GUI detection, no leak and you can use an event instead of using two triggers to make the damage detect work.
 
Calculate the damage first, if the damage is equal to or greater than the target's current HP,
Cause SomeUnit to damage SomeTarget for 99999999.00 damage <-- Lol, sth like that? o.0

Yeah I was considering that, didn't think ti would be a big deal, but that's an easy fix, so thank you for that.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top