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

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
 
Level 5
Joined
Nov 21, 2014
Messages
151
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)
 
Level 13
Joined
Jan 2, 2016
Messages
978
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...
 
Level 7
Joined
Oct 19, 2015
Messages
286
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.
Top