• 🏆 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] help with a trigger pls

Status
Not open for further replies.
Level 19
Joined
May 1, 2008
Messages
1,130
hi im trying to make a cool evasion skill in witch if a unit misses an attack the attacked unit shall move instantly to the left of the attacker unit and do 2x his agility damage to the attacker
i dont know if its possible "unit-unit misses an attack" for the event so i tried

  • Events
    • Unit - A unit Is attacked
    • Conditions
      • ((Random real number between 0.00 and 100.00) Less than or equal to 30.00)
but i dont know how to make him miss the attack :confused:
 
Level 9
Joined
May 27, 2006
Messages
498
Add a 100% evade ability, wait some period of time and then remove it. Then trigger your actions.
The Unit - A unit is attacked event launches a bit faster than the game deals damage to units, so imo you would have enough time to add the evade skill.
 
Level 19
Joined
May 1, 2008
Messages
1,130
unit - issue attacking unit to stop?
that wont work for my needs because i like to make it like the attacking unit is attacking a clone of the attacked unit witch will eventually disappear
so i want the attacking unit to miss its attack
 
Level 19
Joined
May 1, 2008
Messages
1,130
Add a 100% evade ability, wait some period of time and then remove it. Then trigger your actions.
The Unit - A unit is attacked event launches a bit faster than the game deals damage to units, so imo you would have enough time to add the evade skill.
ye i try that but the hero may have 0.2 sec attack speed and he can have 2 sec attack speed so the waiting time wont work if teh victim unit is attacked continuously
sorry for 2X post D:
 
Level 12
Joined
Mar 23, 2008
Messages
942
this is strange, since passive abilitys have orderID.

do that:

  • HAHA
  • Events
  • Unit - Learns a skill
  • Conditions
  • Unit - Learned Skill is equal to "OMG I MISS"
  • Actions
  • Trigger - Add "(Learning Hero) Takes Damage to HEHE<gen>
  • HEHE
  • Events
  • Conditions
  • Actions
  • If (Random integer from 1 to 100) is less than or equal to 30
    • Floating Text - Display red "MISS"
    • Unit - Set Life of (Triggering Unit) to ((Life of Triggering Unit) + (Damage Taken))
    • Unit - Omg teleport me there!
 
Level 19
Joined
May 1, 2008
Messages
1,130
no i worked with gui spells before i began to terrain so i know how to make teh spells i need ;). but if u want to terrain just follow the tutorials ;)
 
Level 12
Joined
Jun 28, 2008
Messages
688
Very nice job Saishy (and lol at putting air units on the map XD), though one thing I did notice that was an issue with the trigger is that once the Hero dodges an attack, he switches targets. This might be an undesirable side effect to the ability. Something you could do to fix it is each time the Hero attacks a unit, set that unit to a Unit variable. Then when the ability triggers, you make the Hero target that unit again, like this:

  • Attacks
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Blademaster
    • Actions
      • Set attackedunit = (Attacked unit)
  • Missed
    • Events
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) has buff Stunned) Equal to False
          • ((Triggering unit) has buff Stunned (Pause)) Equal to False
          • ((Triggering unit) has buff Stasis Trap) Equal to False
          • ((Triggering unit) has buff Entangling Roots) Equal to False
          • ((Triggering unit) has buff Ensnare (Air)) Equal to False
          • ((Triggering unit) has buff Ensnare (General)) Equal to False
          • ((Triggering unit) has buff Ensnare (General)) Equal to False
      • (Damage taken) Equal to 0.05
    • Actions
      • Set temppoint[0] = (Position of (Triggering unit))
      • Special Effect - Create a special effect at temppoint[0] using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set temppoint[1] = (Position of (Damage source))
      • Set temppoint[2] = (temppoint[1] offset by 100.00 towards ((Facing of (Damage source)) + (90.00 x (Real((Random integer number between -1 and 1))))) degrees)
      • Unit - Move (Triggering unit) instantly to temppoint[2]
      • Animation - Play (Triggering unit)'s Attack Slam animation
      • Unit - Cause (Triggering unit) to damage (Damage source), dealing ((Real((Agility of (Triggering unit) (Include bonuses)))) x 2.00) damage of attack type Hero and damage type Normal
      • Unit - Order (Triggering unit) to Attack attackedunit
      • -------- Makes the evading Hero attack his original target rather than finding a new one. --------
      • Floating Text - Create floating text that reads Miss above (Damage source) 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 - Change the lifespan of (Last created floating text) to 1.00 seconds
      • Custom script: call RemoveLocation(udg_temppoint[0])
      • Custom script: call RemoveLocation(udg_temppoint[1])
      • Custom script: call RemoveLocation(udg_temppoint[2])
      • -------- Saishy forgot to remove temppoint[2] in his trigger. >.< --------
Also, "It would probably also be triggered by cleave and pulverize effects."

It kinda makes sense to be able to dodge those sorts of things, doesn't it?
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
Ofcoarse you would be able to dodge it, but for this trigger you're supposed to teleport behind that target right? I don't know what you think, but if i were playing a map with that ability, i would get pretty frustrated if my unit were jumping across the battlefield and switching targets all the time.
 
Status
Not open for further replies.
Top