• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

how to detect when unit "misses" ?

Status
Not open for further replies.
Level 9
Joined
Jan 14, 2008
Messages
366
i cant believe there is not such an event! i mean its pretty basic!

can anyone help me figure out how to detect when a unit misses a basic attack? or can one detect the unit as the unit that starts the effect of an ability (evasion) ?

thanks in advance
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Nope. Not possible. Only way to emulate such a thing is with Jass and a damage detection system/engine.

And people, please learn to use the search.
 
Last edited:
Level 9
Joined
Jan 14, 2008
Messages
366
thanks. very very sad thing that this is not possible =O

and yes i searched. but i really have to point out, hive workshops search thing is total crap. maybe i am doing something wrong but i search for "miss detection" and i get quintillions of posts and threads about anything except detection of ANY kind.
 
Level 9
Joined
Jan 14, 2008
Messages
366
display a floating text that reads "block" over the attacked unit, and remove the "miss!" text over the attacking unit by replacing it with an empty space in game interface settings.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
And what about the normal misses?


In the case he could detect the standard misses, he would have displayed some of the misses as miss and some as block, depending on the skill procing.
 
The only way to detect misses is to build an evation ability through a damage detection system.

Edit: This will work very well if that is a Hero Only abilty, since you wont have to constantly add new unit's to the trigger, here I'll show you.
Edit 2:
  • Evasion Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Evasion
      • (Level of Evasion for (Learning Hero)) Equal to 1
    • Actions
      • Trigger - Add to Evasion <gen> the event (Unit - (Learning Hero) Takes damage)
  • Evasion
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to (5 + ((Level of Evasion for (Triggering unit)) x 5))
        • Then - Actions
          • Floating Text - Create floating text that reads Miss above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
          • -------- Your Actions --------
        • Else - Actions
This will work. :xxd:

Edit 3: oops, mistake in trigger.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Though that is the correct way to go, consider that that trigger will activate from spells too.
 
Level 9
Joined
Jan 14, 2008
Messages
366
Couldn't you just replace miss with block on the interface?

yes i also had that idea, the problem is that i want the "block" text to be displayed above the attacked unit. the standard "miss" text is displayed above the attacking unit, therefore replacing that would suggest that the attacking unit "blocked", wich is not what i want.

This will work very well if that is a Hero Only abilty, since you wont have to constantly add new unit's to the trigger, here I'll show you.

thank you for the trigger tough the problem with that is its very buggy. for instance, besides the fact that it fires also from spell damage, a hero might die from an attack that was blocked, before the trigger recompensates the damage by adding equivalent hitpoints.

=|

thanks everyone!
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
a hero might die from an attack that was blocked, before the trigger recompensates the damage by adding equivalent hitpoints.


The unit is damaged event fires right before the unit is damaged.
From there, how you block the damage, is up to you.
 
Status
Not open for further replies.
Top