1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

BuffPlacer-Abilty + Takes-Damage = Crash

Discussion in 'Patch & Reforged Discussion' started by Jimpanse1, May 29, 2019.

  1. Jimpanse1

    Jimpanse1

    Joined:
    Sep 29, 2016
    Messages:
    42
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     

    Attached Files:

  2. EdgeOfChaos

    EdgeOfChaos

    Joined:
    Jan 8, 2014
    Messages:
    643
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    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)
     
  3. Jimpanse1

    Jimpanse1

    Joined:
    Sep 29, 2016
    Messages:
    42
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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!