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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  4. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  5. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Do you have good ideas for new contests? If so, please open new threads in the Contest Submission sub-forum to discuss them.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Create unit using animation

Discussion in 'World Editor Help Zone' started by Marcell, Mar 20, 2018.

  1. Marcell

    Marcell

    Joined:
    Jan 17, 2018
    Messages:
    112
    Resources:
    0
    Resources:
    0
    • Raise Dead
      • Events
        • Unit - A unit Dies
      • Conditions
        • (Unit-type of (Killing unit)) Equal to Skeleton Archer
      • Actions
        • Set ArcherKill = (Position of (Killing unit))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (((Owner of (Killing unit)) Food used) + 3) Less than or equal to ((Owner of (Killing unit)) Food cap)
          • Then - Actions
            • Unit - Create 1 Skeleton Archer for (Owner of (Killing unit)) at ArcherKill facing (Random angle) degrees
            • Custom script: call RemoveLocation(udg_ArcherKill)
          • Else - Actions


    This is what I got so far, but I would like to make it so that if the archer kills an unit, the archer doesn't instantly spawn, but instead climbs out of the ground just like the Raise dead ability. How would I do that? I'm sure it's got to do with an Animation trigger, perhaps "queue unit animation"?
     
  2. nedio95

    nedio95

    Joined:
    Mar 24, 2011
    Messages:
    1,055
    Resources:
    1
    Spells:
    1
    Resources:
    1
    • Animation - Play (Last Created Units)'s birth animation


    This ^

    It should be under "Animation - Play Unit Animation". Also, "birth" is a string, you have to type it yourself. There is a list of what animations war3 models have or something similar around.
     
  3. pOke

    pOke

    Joined:
    Mar 24, 2013
    Messages:
    1,104
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Does the unit actually have a "climb out of the ground" animation? Or are you trying to simulate it?
     
  4. nedio95

    nedio95

    Joined:
    Mar 24, 2011
    Messages:
    1,055
    Resources:
    1
    Spells:
    1
    Resources:
    1
    The war3 skeleton archer does, and it is it's "birth" animation. If it is a custom model though...
     
  5. Marcell

    Marcell

    Joined:
    Jan 17, 2018
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Thanks, I knew it was something like that, but having to input the word myself is so dumb of blizzard when 99% of the WE is select abc.

    On another note, do I need to save the animation to a variable and kill it later or is that trigger as is fine?
     
  6. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,930
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Should be fine as is. It instructs the unit's actor to play the animation and that state is overwritten when the unit receives another animation, eg walking or attacking. Hence no leak.

    Animation tags are a different problem, one might have to remove them after adding them since they modify the set of animations played. That said I am not sure WC3 supports dynamic animation tags.
     
  7. Chaosium

    Chaosium

    Joined:
    Aug 29, 2012
    Messages:
    417
    Resources:
    2
    Models:
    2
    Resources:
    2
    You may want to add "Queue unit's stand animation", otherwise the unit may appear "frozen" when birth animation is completed, and if there is no enemy unit in acquisition range, it will just stand there frozen in the last frame of birth anim, until ordered to do something.

    It's a minor visual inconvenience, but heh.
     
  8. Marcell

    Marcell

    Joined:
    Jan 17, 2018
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Thanks, not however, as annoying as whilst in the midst of battle the animation is playing for a split second so that the unit can start attacking. Pause unit would suffice for this and unpause when the animation is complete?
     
  9. nedio95

    nedio95

    Joined:
    Mar 24, 2011
    Messages:
    1,055
    Resources:
    1
    Spells:
    1
    Resources:
    1
    @Dr Super Good @Chaosium correct me if I am wrong.

    The animation tags are not hard-coded at all. As I am aware the animation tags are defined by the artist who makes the model and are custom?
    Blizzard have put some standardized tags in War3 models which have become a standard for the community to use, but then you can have pretty much anything. e.g. artist can call an animation "blahblehbluh" ? As such, you'd have and need freedom of input there.

    War3 community sticks to standardized "Attack - 1", "Attack - 2", "Attack - 3", "Spell", "Stand" etc. to not confuse the users and make a robust & re-usable content, both for art & code.

    @Marcell wait for either Dr or Chaos to confirm. I am not particularly in-depth with the war3 engine or modeling.
     
  10. Chaosium

    Chaosium

    Joined:
    Aug 29, 2012
    Messages:
    417
    Resources:
    2
    Models:
    2
    Resources:
    2
    Never actually tested custom tags to be honest, but I have some memories of me testing the "seventh" tag and not being supported by the game. I might be wrong tho, gotta test this up!
     
  11. Marcell

    Marcell

    Joined:
    Jan 17, 2018
    Messages:
    112
    Resources:
    0
    Resources:
    0
    How would I get my unit to complete the "birth" animation before he starts attacking :<?
     
  12. Chaosium

    Chaosium

    Joined:
    Aug 29, 2012
    Messages:
    417
    Resources:
    2
    Models:
    2
    Resources:
    2
    As you suggested, I guess pausing it would do? Other means would be deactivating his attack but that would be a bit over the top...
     
  13. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,484
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    I got 3 Ideas how to.
    • Let the skelett cast a channeled Spell ('ANcl') with disable other abilities, channel time should be birth animation time - cast point time.
      • when finished remove the ability from the unit
    • Stun it with a stormbolt clone.
    • pause it, like chaosium said (Wait + Local or GTS might be your friend).