Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Spell Animation Issue

Discussion in 'World Editor Help Zone' started by RottenFetus, Apr 25, 2013.

  1. RottenFetus

    RottenFetus

    Joined:
    Apr 23, 2013
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Hello everyone, I have a problem with a spell, with his animation in particular.
    The spell is supposed to be an immolation that also heals nearby allies every second. Pretty simple. Indeed the immolation damage works and my trigger to heal the allies either. But I also wanted to play a little heal animation on allies when they get a heal. So I put down this trigger:

    Event: Every 1 second of game time
    Condition: (MyUnit) has buff Immolation Equal to TRUE
    Actions: Unit Group* - Pick every unit in (Units within 350.00 of (Position of MyUnit) matching ((((Matching unit) belongs to an ally of (Owner of MyUnit)) Equal to TRUE) or ((Owner of (Matching unit)) Equal to (Owner of MyUnit)))) and do (Actions)
    Loop - Actions
    Unit* - Create 1 Animation_dummy for Player (Red) at (Position of (Picked unit)) facing blabla buildings degrees
    Unit* - Add a 1.00 second Generic expiration timer to (Last created unit)


    The dummy has the "Gain experience" animation as model, but, after a quick try, I noticed the the dummies were not deleted after their spawn, and in a few seconds the map started lagging and glitching under the pressure of all those models, one onto the other. I can't understand why the generic expiration timer don't work on the dummy.

    Thanks for the help.
     
  2. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    The expiration timers do work on the dummies, but it only kills them. When a unit dies, it doesn't disappear (at least not instantatly) but it plays its "death" animation instead. Since your dummy doesn't have that animation, it keeps playing its default animation ("stand" in that case).

    The solutions :
    1) You can use special effects instead of a dummy. Alternatively, if you need to change the effect's size, you can use a dummy with no model (use Vexorian's dummy since you need an attachment point) and add/destroy the special effect on him.
    2) You can remove your dummy from the game after it ends its animation. The easiest way to to it in GUI is to use this trigger (plus the one you're already using) :
    • Events
      • Unit - A unit dies
    • Conditions
      • (Unit-type of (triggering unit)) equals to Animation_dummy
    • Actions
      • Unit - Remove (triggering unit) from the game


    The animation duration for "LevelupCaster.mdx" is of 1.867 seconds.
     
  3. RottenFetus

    RottenFetus

    Joined:
    Apr 23, 2013
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Awh great! It worked perfectly, thank you!
     
  4. Nichilus

    Nichilus

    Joined:
    Sep 26, 2009
    Messages:
    2,004
    Resources:
    0
    Resources:
    0
    Or you could go to Object editor, find your dummy and set it's fields:
    Art - Death Time to 0 seconds
    Combat - Death Type to Can't raise, does not decay
     
  5. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    The solution Nichilus posted is better than using a trigger for this.

    You can leave Art - Death time to the default value, a few seconds if you want to play some animation or effect on the dying unit.

    The death type, does not decay, makes the unit to skip the bone and flesh decay times, which are 90 seconds by default.