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

[Trigger] Charge Animation

Status
Not open for further replies.
Level 12
Joined
Nov 20, 2007
Messages
660
I'm in troube with walk animation while the hero is charging. The problem is that the hero doesn't play the animation.
Charge
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Charge
  • Actions
    • Set BW_C_Index[2] = (BW_C_Index[2] + 1)
    • Set BW_C_Caster[BW_C_Index[2]] = (Casting unit)
    • Set BW_C_Target[BW_C_Index[2]] = (Target unit of ability being cast)
    • Set BW_C_Leak = (Position of BW_C_Caster[BW_C_Index[2]])
    • Set BW_C_Leak2 = (Position of BW_C_Target[BW_C_Index[2]])
    • Set BW_C_Angle[BW_C_Index[2]] = (Angle from BW_C_Leak to BW_C_Leak2)
    • Unit - Pause BW_C_Caster[BW_C_Index[2]]
    • Animation - Change BW_C_Caster[BW_C_Index[2]]'s animation speed to 150.00% of its original speed
    • Animation - Play BW_C_Caster[BW_C_Index[2]]'s Walk animation
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • BW_C_Index[2] Equal to 1
      • Then - Actions
        • Trigger - Turn on Charge Periodic <gen>
      • Else - Actions

Charge Periodic
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • For each (Integer BW_C_Index[1]) from 1 to BW_C_Index[2], do (Actions)
      • Loop - Actions
        • Set BW_C_Leak = (Position of BW_C_Caster[BW_C_Index[1]])
        • Set BW_C_Leak2 = (Position of BW_C_Target[BW_C_Index[1]])
        • Set BW_C_Distance = (Distance between BW_C_Leak and BW_C_Leak2)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • BW_C_Distance Greater than or equal to 150.00
          • Then - Actions
            • Set BW_C_Distance = ((Distance between BW_C_Leak and BW_C_Leak2) / 15.00)
            • Set BW_C_Leak = ((Position of BW_C_Caster[BW_C_Index[1]]) offset by BW_C_Distance towards BW_C_Angle[BW_C_Index[1]] degrees)
            • Unit - Move BW_C_Caster[BW_C_Index[1]] instantly to BW_C_Leak, facing BW_C_Angle[BW_C_Index[1]] degrees
          • Else - Actions
            • Animation - Change BW_C_Caster[BW_C_Index[1]]'s animation speed to 100.00% of its original speed
            • Animation - Reset BW_C_Caster[BW_C_Index[1]]'s animation
            • Unit - Unpause BW_C_Caster[BW_C_Index[1]]
            • Set BW_C_Caster[BW_C_Index[1]] = BW_C_Caster[BW_C_Index[2]]
            • Set BW_C_Target[BW_C_Index[1]] = BW_C_Target[BW_C_Index[2]]
            • Set BW_C_Leak = (Position of BW_C_Caster[BW_C_Index[2]])
            • Set BW_C_Leak2 = (Position of BW_C_Target[BW_C_Index[2]])
            • Set BW_C_Angle[BW_C_Index[1]] = (Angle from BW_C_Leak to BW_C_Leak2)
            • Set BW_C_Index[2] = (BW_C_Index[2] - 1)
        • Custom script: call RemoveLocation(udg_BW_C_Leak)
        • Custom script: call RemoveLocation(udg_BW_C_Leak2)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • BW_C_Index[2] Equal to 0
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions

 
Level 12
Joined
Nov 20, 2007
Messages
660
Try

  • Custom script: call SetUnitAnimationByIndex(udg_BW_C_Caster[BW_C_Index[2]] , index)
Replace that index with an integer, try values from 0->. Eventually you'll find the walk animation index.

If you have based the ability on Channel, set the follow through time so that it lasts for the charge's duration.

1. I get an error "Expected name" ..
2. The spell is based on Channel and has 1 sec and requests animation "Stand"
 
Status
Not open for further replies.
Top