• 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 do I make an enemy do an attack routine?

Status
Not open for further replies.
Level 4
Joined
Jun 22, 2009
Messages
36
Hi, so I was wondering if there was a way to make a unit, when a character enters the unit's aquisition range, to run up and attack the character three times, then stop and wait ten seconds, then do the attack routine again?
Sorry if this sounds a little confusing, but please help.
On a different note, is there a way to override a unit's animation as it begins to play it?
Thanks!:grin::grin::grin:
 
Level 8
Joined
Nov 9, 2008
Messages
502
Yes, I know the JASS function is...

JASS:
native          SetUnitAnimation            takes unit whichUnit, string whichAnimation returns nothing

...there is also...

JASS:
native          SetUnitAnimationByIndex     takes unit whichUnit, integer whichAnimation returns nothing

...which also loops the animation properly and is set using number reference to the animation.

There are also options in the GUI under 'Animation' to control object animations.
 
Status
Not open for further replies.
Top