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

[Trigger] Change Animation Speed doesn't detect fast enough

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2007
Messages
201
I have a unit who uses weapons at different speeds depending on what type of weapon he is holding. His base attack rate is 3.5, and each item has a version of Endurance Aura on it that increases his attack rate to the proper rate for that weapon, 3.5 being my slowest weapon's rate.

My problem is, when you increase attack rate in this manner, it doesn't decrease the cooldown between attacks, it litterally speeds up the character's animations so it looks like he is spastically lashing out when at Very Fast Attack Speed. I thought I could counter this by setting his animation speed to 0.10% or some number every time a unit is attacked and he is the attacker, but for some reason it never can catch the animation and slow it down. He attacks super fast, and then any animations he does right after that display at the 0.10.

Is there any way to alter attack speeds or animation speeds in the way I am describing with it still appearing seamless and not suddenly able to strike at lightspeed?
 
Level 2
Joined
Jul 13, 2009
Messages
9
If you use "Event - A unit is attacked" the trigger will run when the unit begins the order "attack" not when it damages.
So first, her anim. speed will be slowed down, and (maybe) when the attack finishes it will be set to default again..
 
Last edited:
Level 6
Joined
Aug 12, 2007
Messages
201
the animation speed has nothing to with attack speed. If you want an attack speed increase, increase a hero's agility, or add some kind of attack speed increasing ability to it if it's not a hero.

You're not understanding. When you use any attack speed increasing items or abilities, he literally animates much faster then normal. I want to reduce his cooldown so this doesn't happen, or make it appear that he is animating at normal speed. If I give him a base cooldown of 3, when he is given a speed boosting item, he doesn't just strike more often, he lashes out at lightspeed, which I don't want. Increasing agility has the same effect.
 
Level 6
Joined
Aug 12, 2007
Messages
201
Maybe you could use "Animation - Set unit animation speed" (don't remember its exact name) together with some kind of system?

That's the exact trigger that I am saying doesn't work, when he attacks, he attacks at lightspeed, and then it makes the next animation after that affected by that trigger, the trigger can't catch his current attack and make it display normal.
 
Level 2
Joined
Jul 17, 2009
Messages
27
The system is designed to work with cooldowns matched to a unit's attack animations. The speeding up of attack animations should be necessary in order to complete the attack animation before the next attack begins.

I suggest setting the BAT to a value appropriate to the units' animation speeds, and using positive and negative attack speed modifiers from there.

Alternatively, you'd need a way to morph the unit into a different unit (with a different BAT) depending on the items he had.
 
Level 9
Joined
Nov 28, 2008
Messages
704
I think I got this. Try reordering the unit to do the same thing after. If it does not catch the current order, just reorder it after. Simplistic in concept, but perhaps keeping track of a unit would be complex. It would be a simple vJass thing, but I don't know about GUI :/.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
The speed of attack animation increases so it becomes appropriate to the cooldown duration. ex. If you have 1 sec cooldown he will attack once every 1 second and the attack animation takes 0.65 sec he will attack at normal animation speed but if the cooldown is reduced to 0.5 sec the attack animation (0.65 sec) must be reduced too or you will find a lag in the attack meaning that the unit will damage target twice in a single animation. I think to make the attack animation at normal speed; cooldown must not be less than the attack animation duration.
 
Status
Not open for further replies.
Top