• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Attack?

Status
Not open for further replies.

DarkReaperX

D

DarkReaperX

Hey, how do i make a unit/stucture attack itself with a projectile, like chain lightning? :cry:
 
Hey, how do i make a unit/stucture attack itself with a projectile, like chain lightning? :cry:

  • <Name of the Trigger> (e.g. Unit suicide)
    • Events
      • <Your Events>
    • Conditions
      • <Your Conditions>
    • Actions
      • Unit Group - Pick every units of (Unit-type of(<Your unit>)) and do (Actions)
      • Loop - Actions
        • Unit - Cause (Picked unit) to damage (Picked unit), dealing <Your damage value> with damage type Normal and attack type Normal
        • Animation - Play (Picked unit)'s attack animation
        • <Your further actions>
Your further actions must be within the Unit Group loop and remember to respond to Picked unit on all of the actions you want to add so your actions will respond to the unit itself.

I hope it helps!!!:grin:
 
Self-attack is not possible on Warcraft III; like sephiroth1234 suggested, you need triggers, since Warcraft III forces your unit to Attack-Move to its own position, when you order an attack towards itself. Chain Lightning is not a projectile, it's a lightning effect. What is more, if the unit attacks itself, the projectile/lightning effect will most likely not appear, since the unit's position is not changed, thus, for the lightning, a script of type:
  • Set Point1 = (Position of (Triggering unit))
  • Lightning - Create a Chain Lightning - Primary lightning effect from source (Point1) to target (Point1)
  • Custom script: call RemoveLocation (udg_Point1)
will not reveal a lightning, because the lightning's length is zero. Why? Cause if you get the distance between Point1 and Point1, it will return 0, since the references are both the same point.

If you mean the Chain Lightning ability to be able of damaging yourself as well, you need to add to "Targets Allowed" of the ability the "Self" too.
 
Status
Not open for further replies.
Back
Top