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

Freeze unit on stun

Status
Not open for further replies.
Level 6
Joined
May 11, 2010
Messages
236
Hey all. Would anyone lend me a hand in how to go about making a unit 'freeze' on a stun, as in a spell like bash, but whenever the unit gets afflicted by bash, ie stunned, the units animation speed is 0% meaning it's frozen until the end of the stun and then when the stun wears off the animation speed reverts back to 100%. + rep for help and suggestions.
 
Level 6
Joined
May 11, 2010
Messages
236
Yes but how can I get it to check every unit all the time to see whether or not it has the buff. It's a passive ability so i'm finding it kinda annoying to track.
 
Yes but how can I get it to check every unit all the time to see whether or not it has the buff. It's a passive ability so i'm finding it kinda annoying to track.

  • Events
    • Time - Every .03 seconds of game time
  • Actions
    • Set GROUP = Pick every unit in ...
    • Unit Group - Pick every unit in group and do
      • do - Actions
        • If - conditions
          • pickedunit has buff (stun) equal to true
        • Then - actions
          • Animation - Set unit animation speed to 0
        • Else - actions
          • Animation - Set unit's animation speed to 100
      • Custom script: call DestroyGroup(udg_GROUP)
but if you have another trigger that modifies animation speed this could cause bugs...
 
Level 4
Joined
Jul 24, 2010
Messages
85
Not sure what you want but here my suggestion:

Use this system or use event "When unit takes damage"
http://www.thehelper.net/forums/showthread.php?t=137957
Check boolean "If damaged unit having "Stun" buff == true"
Then action what you want.

As I've test, you may want this trigger.
  • TEST
    • Events
    • Conditions
    • Actions
      • -------- Leave event to nothing and add event unit takes damage through other trigger --------
      • -------- Or set event to (real) GDD_Event become == 0 if you use GDD system. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ((Triggering unit) has buff Stunned) Equal to True
              • ((Triggering unit) has buff Stunned (Pause)) Equal to True
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Not equal to (Order(stop))
            • Then - Actions
              • Animation - Play (Triggering unit)'s (String((Current order of (Triggering unit)))) animation
              • Animation - Change (Triggering unit)'s animation speed to 0.00% of its original speed
            • Else - Actions
        • Else - Actions
          • Animation - Change (Triggering unit)'s animation speed to 100.00% of its original speed
Help2.gif

Hope this is what you want (In the picture above, I haven't add special effect because it will be hard to see the animation.)
:goblin_good_job:
 
Status
Not open for further replies.
Top