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

Play attack 1 then attack 2 then attack 3

Level 45
Joined
Feb 27, 2007
Messages
5,578
There is the function PlayUnitAnimationByIndex which you can use to play any specific animation a model has if you know what its index value is. This cannot be applied to animations triggered by abilities, as those do not allow you to choose an index just a name/tag. I believe GUI does not have access to this function directly.
 
Level 18
Joined
Dec 20, 2012
Messages
269
If you mean regular attacks, then I don't think that's possible.

For triggered abilities, that's possible though I don't know any resource in the Spells & Systems section that do this but I know it exists atleast. I seen a couple of cool abilities in Anime AoS/etc maps for example.
 
Level 24
Joined
Feb 27, 2019
Messages
833
Had this test map with a similar problem so I made a few improvements. It uses the animations from model as mentioned. The idea is to add/remove sub animation at a certain time. I also implemented barrage to damage self which detects when the attack has executed. The part I am unsure of is the Damage trigger itself. The report said the damage was Splash damage and that Attack damage was detected but there is no IsDamageSplash and IsDamageAttack returns false. The damage report reports splash damage when code, attack and spell returns false.
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet AnimationTag[0] = gold
      • Set VariableSet AnimationTag[1] = lumber
      • Animation - Add the AnimationTag[0] animation tag to Peasant 0000 <gen>
  • Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to Peasant 0000 <gen>
    • Actions
      • Countdown Timer - Start AttackTimer as a One-shot timer that will expire in ((Unit: Peasant 0000 <gen>'s Weapon Real Field: Attack Back Swing Point ('ubs1') at Index:0) + (Unit: Peasant 0000 <gen>'s Weapon Real Field: Attack Damage Point ('udp1') at Index:0)) seconds
  • Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 0.00
    • Conditions
      • DamageEventSource Equal to Peasant 0000 <gen>
      • DamageEventTarget Equal to Peasant 0000 <gen>
      • DamageEventWeaponT Equal to WEAPON_TYPE_NONE
      • IsDamageAttack Equal to False
      • IsDamageCode Equal to False
      • IsDamageMelee Equal to False
      • IsDamageRanged Equal to False
      • IsDamageSpell Equal to False
    • Actions
      • Set VariableSet DamageEventAmount = 0.00
      • Set VariableSet HasAttacked = True
  • Timer
    • Events
      • Time - AttackTimer expires
    • Conditions
      • HasAttacked Equal to True
    • Actions
      • Animation - Remove the AnimationTag[AttackIndex] animation tag to Peasant 0000 <gen>
      • Set VariableSet AttackIndex = ((AttackIndex + 1) mod 2)
      • Animation - Add the AnimationTag[AttackIndex] animation tag to Peasant 0000 <gen>
      • Set VariableSet HasAttacked = False
 

Attachments

  • attack animation.w3m
    84.6 KB · Views: 4
Top