Create unit using animation

Status
Not open for further replies.
Level 4
Joined
Jan 17, 2018
Messages
112
  • 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"?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
  • 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.
 
Level 4
Joined
Jan 17, 2018
Messages
112
  • 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.
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?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,284
On another note, do I need to save the animation to a variable and kill it later or is that trigger as is fine?
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.
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
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.
 
Level 4
Joined
Jan 17, 2018
Messages
112
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.

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?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
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.

@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.
 
Level 4
Joined
Jan 17, 2018
Messages
112
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!

How would I get my unit to complete the "birth" animation before he starts attacking :<?
 
Status
Not open for further replies.
Top