• 🏆 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!

BuffPlacer-Abilty + Takes-Damage = Crash

Status
Not open for further replies.
Level 5
Joined
Sep 29, 2016
Messages
43
Hey guys,

I've found a quite annoying bug, while working on my map on 1.30.4.
First of: I don't want to update to 1.31 because i'd love to continue working on my map right now.

To explain the problem: If i want to add a Buffplacer Ability for Custom Buffs onto a unit & that unit takes damage, which is amplified/reduced/anything/0 by any damage source, WC3 crashes instantly.

Add Buffplacer Trigger
  • Events
  • Player - Player 1 (Red) types a chat message containing 1 as An exact match
  • Conditions
  • Actions
  • Unit - Add Weird BuffPlacer to Paladin 0000 <gen>
TakeDamage Trigger
  • Events
  • Unit - Paladin 0000 <gen> Takes damage
  • Conditions
  • Actions
  • Unit - Cause (Damage source) to damage Paladin 0000 <gen>, dealing ((Damage taken) x 2.00) damage of attack type Spells and damage type Normal
I've attached a Testmap to test it. I know there are workarounds for stuff like that, but i'd rather not have wc3 crash in case this combination of stuff happens. Maybe just unable to do the actions, but not a crash.
 

Attachments

  • WeirdBuffTakesDamageCrash.w3x
    13.7 KB · Views: 16

EdgeOfChaos

E

EdgeOfChaos

You made an infinite loop. Or more specifically, infinite recursion.

Paladin takes damage. The trigger makes the source damage the paladin again. This damage (the triggered one) causes the TakeDamage trigger to run again, dealing more damage. Etc.

If you wanna do something like that, first Disable (This Trigger), then deal the damage, then Enable (This Trigger)
 
Level 5
Joined
Sep 29, 2016
Messages
43
Huh, i didn't even notice it. Of course i endlessly loop it like that.

I've added conditions to avoid this situation now.

I guess i didn't notice, because i thought it was related to the buff, but in fact it was related to anything doing any damage to the unit i guess.

Thanks for your help!
 
Status
Not open for further replies.
Top