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

[General] Second attack with item

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
Do you mean kind of like geminate attack from dota?

As far as I know, you'd have to trigger it.

EDIT:
I did make a "double-strike" ability in my map that basically makes the hero hit again (does the same damage as the previous attack and applies all on-hit effects again). It doesn't have an animation component to it, though. It just does the damage and effects.

I had an idea for melee heroes where you could play their current animation with negative speed (basically rewind their attack animation) and then play it with positive speed again. With proper delays and speeds, you could make it look like they hit twice quickly, but it might not work for all attack animations (if they are too short) and it I don't know what would happen if you interrupt the animation. You could maybe pause the unit while it is happening.

For ranged heroes, it would be a lot more complicated. Easiest solution would be to just spawn another projectile. I don't know how you would detect what model to use, though.

All in all, I found it was going to be a ton of work for not that much gain. There'd probably be bugs littered throughout as well, so I just opted to make it do an invisible "hit".
 
Level 12
Joined
May 22, 2015
Messages
1,051
So you want 2 separate animations? I think you can set the animation speed higher in order to play a sequential attack strike faster, use PDD or DamageEngine to detect when the unit deals physical damage, set a .1 second timer, trigger the damage on the second unit and then reset the unit's animation.

Ya, something like this. Though, I think it will be broken for ranged units and they will probably just need a separate trigger.
 
Level 12
Joined
Nov 3, 2013
Messages
989
You can fix ranged units by giving them barrage.

Even if you want the double attack to hit the same unit twice? (not multiple different targets)

I've made a "sort of double attack" thingy myself in some random map that I've scrapped; The ability is based of searing arrow and creates a hidden dummy unit (which I made owned by neutral passive to avoid the hard coded blue tint from illusions) that uses the wand of illusion ability '852274' (There's no string for it so you need the integer ctrl + f "illusion".). The summoned unit (illusion) is then changed up a bit, like matching the player color to the orignial player and changing tint and making it transparent etc after which it's ordered to attack once and then given a short expiration timer to let it's attack animation finish after damage has been detected.

Personally I had the illusion appear behind the enemy to make it look like some shadow clone backstab attack thing, which I thought fit the melee assasin type hero I had, however for a ranged unit I think that you'd probably either want it to stand a bit to the right of the hero or make it transparent and scaled up so that you can clearly make it out when it attacks.

I know this isn't the exact thing that you've asked for but it's pretty close so I thought I'd suggest it.

I've got a map for it but it's really not anything complex and what I put together was quite crude with a bunch of GUI & custom script mix with 3 different unit groups to not have to do any indexing or use hashtable...
 
Status
Not open for further replies.
Top