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

Problem with projectiles (Impale)

Status
Not open for further replies.
Level 2
Joined
Feb 4, 2012
Messages
11
Hi, I really need some help. I want a Hero in a map to have a projectile (instant attack) that is the Impale buff (the spike coming out of the ground). However, when he attacks someone who is just dying that spike comes out sideways out of thin air. I tried to do it with triggers and it worked fine except for the fact that the effect came on any enemy you right-clicked, even if you didn't fulfill the animation and aactually attacked them. So I really need help with this, would be eternally grateful for any help!
Thx in advance
 
Level 2
Joined
Feb 4, 2012
Messages
11
Think it was Unit is attacked, and I realize that it would probably work with a "unit takes damage" but I couldn't find that?
 
Level 5
Joined
Jul 18, 2010
Messages
159
Unit is attacking event and then wait action (mb about 1 or 0.5 seconds?) then create impale effect at targeted unit's position...

I know waits aren't best triggers but try it mb it will work
 
Level 2
Joined
Feb 4, 2012
Messages
11
Yes but then, if i cancel the animation the effect will still display, wont it?
 
Level 5
Joined
Jul 18, 2010
Messages
159
oh... you're right i think... I'll open editor tommorow and try to do something if no one else will post I'll try to help
 
Level 5
Joined
Jul 18, 2010
Messages
159
Event -> Unit Specific Event -> Unit Takes Damage ;)

don't know how it is in english so i had translated it by my own (got Polish editor)
 
Level 2
Joined
Feb 4, 2012
Messages
11
Could you show us your trigger?

What you quoted is not part of the trigger, that's what happens when I configure it in the Data editor. The trigger is really simple, unit gets attacked, damaging unit equal to X then create special effect at attacked unit. Very roughly described

Edit: Moonek, i don't think it would work with specific unit event, has to be generic
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Use orders


  • Untitled Trigger 004
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Wait 0.80 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current order of (Attacking unit)) Equal to (Order(attack))
        • Then - Actions
          • Set TempLoc = (Position of (Attacking unit))
          • Special Effect - Create a special effect at TempLoc using Abilities\Spells\Undead\Impale\ImpaleMissTarget.mdl
          • Custom script: call RemoveLocation(udg_TempLoc)
          • Wait 2.00 seconds
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
^ Help is needed on that... i wouldn't know how to destroy the sfx (if the attackspeed is more than 2, than it will glitch)
 
Level 2
Joined
Feb 4, 2012
Messages
11
Illidans911: That's pretty much what I did except for the order, will try it.
 
Level 2
Joined
Feb 4, 2012
Messages
11
Illidans911: didn't work, sorry

However, the damage detection system worked, it's all perfect now :)
Thanks alot for all your help, sorry for double posting but the problem is now solved!
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Illidans911: didn't work, sorry

However, the damage detection system worked, it's all perfect now :)
Thanks alot for all your help, sorry for double posting but the problem is now solved!

Yeah i was experimenting with it a little bit too. the best way to do it would be to use Bribe's GUI damage system and check wether its a normal or spell attack and if its normal show the sfx.

the reason mine didnt work is because "attack" is the order if u manually attack, "smart" is the order for right clicking, and "" (nothing) is the order for auto-attacking so you'd have to do an Or statement with those three orders
 
Status
Not open for further replies.
Top