• 🏆 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] How can i make unit pause at exact moment.

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,137
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Storm Bolt
  • Actions
    • Animation - Play (Casting unit)'s attack animation
    • Wait 0.05 seconds
    • Unit - Pause Blademaster 0033 <gen>
I want to make it pause during attack animation. It does not matter how many seconds put in wait it always resets attack and pauses.
Blademaster swings his blade and i want to make him pause this exact moment. How can i do that?
 

Attachments

  • this.png
    this.png
    21.8 KB · Views: 2
Level 23
Joined
Apr 3, 2018
Messages
460
There is a function. Idk if it's in gui triggers or only code. I can't see it on 1.32 in gui trigers.
JASS:
SetUnitAnimationByIndex(whichUnit, whichAnimation)

This function plays a specific animation but it takes a number rather than a name, and you have to guess which number corresponds to which animation.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,544
Note that the Pause action is generally avoided since it:
1) Pauses expiration timers, buffs, and basically anything that would happen periodically.
2) Messes up animations like if the unit dies while paused (this may be the only case).
3) Most custom spells/triggers will not play nice with this action. For example, a custom spell that uses a Timer/Wait to track the duration will NOT get paused.

It's still a useful action if you know what you're doing.

But it looks like you simply want to stun the Blademaster which could be a safe alternative to pausing. On patch 1.31+ we have a function called BlzPauseUnitEx() which acts like a triggered stun that doesn't come from an ability and is applied instantly. I often use this when I need to disable a unit and play specific animations, for example with a dash or leap spell. Since you're on an older patch you'll need to rely on something like a Dummy unit casting Storm Bolt.
 
Last edited:
Status
Not open for further replies.
Top