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

How can I do this?

Status
Not open for further replies.
Level 13
Joined
Jan 2, 2016
Messages
978
I have a model with ranged-attack animation, and melee-attack animation.
How can I make it use it's ranged attack against enemies, that are far away, and use its melee attack on units in close range?
The animation names are:
melee - attack 1, attack 2
ranged - attack Altarnate

I kind a want to do this as much as possible trough the object editor :P
But I'm ready to do triggers to make it work....

EDIT: Ah, damn.. wrong sub-forum... (didn't notice I was in triggers and scripts..) please, move this to the right place xP
 
I have a model with ranged-attack animation, and melee-attack animation.
How can I make it use it's ranged attack against enemies, that are far away, and use its melee attack on units in close range?
The animation names are:
melee - attack 1, attack 2
ranged - attack Altarnate

I kind a want to do this as much as possible trough the object editor :P
But I'm ready to do triggers to make it work....

EDIT: Ah, damn.. wrong sub-forum... (didn't notice I was in triggers and scripts..) please, move this to the right place xP

Issue order attack with range is the only way i can see it work (triggers)
 
Well, I have some ideas how could I make it work (I need to test 1 of them to see if i works this way), but they aren't quite what I want.

Idea (1): Make 2 units, 1 of which using Alternate animations. Then give them the thinker's ultimate (ability) and switch between ranged and melee mode like this...

Idea (2): Make the unit melee by default, but give it an auto-cast ability (like black arrow), with animation "attack, alternate" (need to test this to see if it will work).

However, neither of these ideas does quite what I want:
Make the unit use "attack alternate" AUOTOMATICALLY against far-away enemies, and "attack 1/2" against units in melee range.
I could enable both attack 1 and attack 2 for the unit, and give 1 of them 600 range, and the other one - 100 range (haven't really tried this...), but I still don't know how to make the unit use alternate animation when using its ranged attack...
 
I would try using a trigger, it would be fairly simple: when the unit attacks, if the attacked unit is further away than a certain threshold, play the alternate attack animation. This will of course only affect the animation used for the attack, not the attack stats or projectile art.
 
Status
Not open for further replies.
Back
Top