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

[Solved] Change unit's attack animation on the passive skill

Status
Not open for further replies.
Level 6
Joined
Sep 10, 2022
Messages
79
Hello again, I read the threads on attack animations, and I have a couple of questions + about my situation... I created a custom blade master, that has pit lord's cleave instead of a critical strike. Cleave is a passive ability, and every time my blade master performs an attack, he uses Attack Slam animation and nothing else. It does not look good, so I want him also animations Attack - 1 and Attack - 2.
How should I do this? Recently I started to write the trigger that has "Event - Unit Begins casting an ability", then "Ability being cast is Custom Cleave", then I made a variable that has a random value between [1,3]. Then, according to t the value, I try to play unit animation - Attack 1, Attack 2, Attack Slam. But I am not sure I am doing everything correctly. Firstly, I even do not know, if "Event - Unit Begins casting an ability" responds on passive skills like Cleave...

1676413048898.png
 
Level 20
Joined
Aug 29, 2012
Messages
829
You guessed it, the problem is that you can't detect a unit using passive abilities, and Cleave is hardcoded to use the unit's attack slam animation, so that's an annoying issue

I can see two solutions: 1) editing the blademaster model to remove the "attack slam" animation (that's very easy), or b) creating a fully triggered Cleave ability
 
Level 6
Joined
Sep 10, 2022
Messages
79
You guessed it, the problem is that you can't detect a unit using passive abilities, and Cleave is hardcoded to use the unit's attack slam animation, so that's an annoying issue

I can see two solutions: 1) editing the blademaster model to remove the "attack slam" animation (that's very easy), or b) creating a fully triggered Cleave ability
Ok, I will try the first option. But I have never edited models before. What do I have to do ..?
 
I'd download Retera's Model Studio
Open the blade master.
Find the model-tab and the attack slam animation and simply delete it and save the model, then import it to your map and see if it worked.
As always, back-up your map regularly.
Corrupted and/or messed up models can cause issues for the map that can be hard to solve (although such a simple edit should be hard to mess up that bad).
 
Level 21
Joined
Dec 4, 2007
Messages
1,479
  • CleaveHoppingFix
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Blademaster
    • Actions
      • Animation - Queue (Attacking unit)'s attack animation
      • Animation - Play (Attacking unit)'s attack animation
can add a simple integer condition to sometimes allow for slam to animate
 
Level 6
Joined
Sep 10, 2022
Messages
79
I'd download Retera's Model Studio
Open the blade master.
Find the model-tab and the attack slam animation and simply delete it and save the model, then import it to your map and see if it worked.
As always, back-up your map regularly.
Corrupted and/or messed up models can cause issues for the map that can be hard to solve (although such a simple edit should be hard to mess up that bad).
I downloaded the model studio, and it asked, where the install location of war3. I indicated, but I can't find the model's folder. War3 Reforged has "Data" -> "data" and there are no model files. (at least the model viewer can see nothing). Should I first export the blade master model? (how to do that ?)

  • CleaveHoppingFix
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Blademaster
    • Actions
      • Animation - Queue (Attacking unit)'s attack animation
      • Animation - Play (Attacking unit)'s attack animation
can add a simple integer condition to sometimes allow for slam to animate
Haha, I tried something like that, but it looks weird. Blademaster starts Slam Attack when he even has not finished the previous one...

UPD: Well, I managed to open the standard blade master model, now how to delete Attack Slam Animation ..? It cannot be deleted via the "Delete" button or Edit tab -> Delete...

UPD 2: I went to Scripts -> Edit / Delete mode Components. It seems to be the correct decision
 
Last edited:
Level 6
Joined
Sep 10, 2022
Messages
79
Now I have another problem, I made the steps written above, and now my blade master has not a portrait. I tried to save his model in .mdx and .mdl (I edited the classic model) and the problem is when I removed only the Attack Slam animation, he lost his portrait in the game... Anything else works good. Where did I go wrong?

1676465838995.png
 
Level 20
Joined
Aug 29, 2012
Messages
829
You either need to:

1) Change to model path so it replaces the standard blademaster (should be Units\Orc\HeroBladeMaster\HeroBladeMaster.mdx), in which case it wll use the default BM portrait

2) Or import a custom portrait (in this case the default BM portrait would work) and change the model path.
If your model has the path "Blademaster.mdx", the portrait needs to be named "Blademaster_Portrait.mdx" for the game to recognize it.

The advantage with solution 1 is that you save a few bytes by not having to import an additional file, but any Blademaster model on your map will use your custon one
 
Level 6
Joined
Sep 10, 2022
Messages
79
You either need to:

1) Change to model path so it replaces the standard blademaster (should be Units\Orc\HeroBladeMaster\HeroBladeMaster.mdx), in which case it wll use the default BM portrait

2) Or import a custom portrait (in this case the default BM portrait would work) and change the model path.
If your model has the path "Blademaster.mdx", the portrait needs to be named "Blademaster_Portrait.mdx" for the game to recognize it.

The advantage with solution 1 is that you save a few bytes by not having to import an additional file, but any Blademaster model on your map will use your custon one
Thank you very much. I chose second option because I do not want to replace the standard .mdx for blademaster + my map may be for co-op...
 
Status
Not open for further replies.
Top