• 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.

[Trigger] How to tell if a unit missed?

Status
Not open for further replies.
Level 3
Joined
Jun 7, 2007
Messages
33
Ok...I need help with this trigger, I can't find what I need and I've looked all over. I want a trigger that when a unit is attacked it will detect if it missed, and if it missed and is equal to Orc Warrior it will replace Revenge (the passive version, as not to let them use it unless it missed) with the castable version of Revenge. I know how to do everything except to detect if the unit missed.....If anyone could please help me ^_^
 
Level 11
Joined
Jul 12, 2005
Messages
764
It's not a good idea, cause he would have to use a variable for storing life, and it wouldn't be MUI, so it will bug like hell...

You have to do it with a "custom miss system". If you tell me what you want to do after "detecting" the miss, i can make the system/trigger for you in jass. (If you want me to..) This can't be done in GUI...
 
Level 13
Joined
Aug 31, 2005
Messages
823
No he wouldnt. Just set it so that periodically the units custom value is set to its life. Then if a unit is attacked and attacked units life < custom value of attacked unit then -run trigger-

Although If I were him, Id just let you do it in jass. Jass is awesome and its very kind of you to offer that to him.
 
Level 3
Joined
Jun 7, 2007
Messages
33
Thanks Paskovich! :) Well....What I want....Is when a unit is attacked and that attack is a miss and the attacking unit is an Orc Warrior it will replace his current revenge (passive) spell with the correct revenge (active) spell, it's going to have different levels so...however you would do that....I could give you my map, it would be easier if you created it in the map I suppose, so you could have the spell IDs, but they aren't made yet >_>

Edit: Ehh, something else I need help on >_> This trigger:

  • Show Damage
    • Events
      • Advanced - Any unit takes damage
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads ((String((Damage taken))) + !) above (Attacked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
It pops up with 0.000! everytime, don't know what I did wrong o_O
 
Level 11
Joined
Jul 12, 2005
Messages
764
Oh hell! I just realized that this "miss-detection" would not work on Evasion passives. I'm sorry this is more complicated than i thought. I would have to remake every Evasion-type ability with all different chance values, and such. That's pretty hard and long work, and i don't really have time for that :S Sorry to disappoint you! Sry, sry, sry!!

For your floating text trigger, use Triggering unit or Damaged unit, but not Attacking unit. The unit was not attacked, but damaged. It's not the same!
 
Level 3
Joined
Jun 7, 2007
Messages
33
= o Ok, thanks lol. >_< I don't mind about the miss thing, kinda thought it might be a little complicated if I couldn't figure it out on my own. I normally can figure out these things by myself =/ Thanks anyway. +Rep For helping me with my other trigger and your wanting to help on the other trigger.
 
Level 3
Joined
May 28, 2007
Messages
57
change it to damaged unit because your unit is not triggering anything so it won't work thats why your floating text is 0.000 and i'm not sure of this but for your ability you want why not say for the function
if random integer between 1,100 is less than or equal to a 1 give unit evasion but change the evasion to 100% wait a second or so remove the evasion and then give your unit the ability you want to give him i dont have my pc with me at the moment so i cant give you the exact trigger but it should work.
 
Level 11
Joined
Jul 12, 2005
Messages
764
@Final_Nova
In the event EVENT_UNIT_DAMAGED, both Triggering unit and Damaged unit are the same. They both work. It's like Ordered unit and Triggering unit.

And he wants to detect if an exact unit misses! Not the one that attacks the orc warrior. That's why this is (nearly) impossible.
 
Level 3
Joined
May 28, 2007
Messages
57
My bad misinturpreted the question thanx for pointing that out Pask the only way i think it can be done is now by jass i don't think it can be done in GUI.
 
Status
Not open for further replies.
Top