• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Spell] Charge with animation

Status
Not open for further replies.
Okay guys i need to move my unit (i wanna fix my charge spell but dont know how) with running animation and i need to do it via custom script

I need someone to tell me how that custom script would look like

For example

WE have unit, angle, distance per moving...
i know how to do it in GUI but i need also an running animation to go with it and it seems that it doesnt work somehow when u move the unit via GUI trigger
 
Use SetUnitX and SetUnitY, both do not issue a stop order unlike other unit moves. Warning they will bug on buildings (they fail to move the pathing footprint and origin).

i need it with distance

Right. Attempt changing the units X and Y value directly then.

  • Actions
    • Set yourUnit = (Triggering unit)
    • Set yourLoc = (Position of yourUnit)
    • Custom script: call SetUnitPosition(udg_yourUnit, GetLocationX(udg_yourLoc), GetLocationY(udg_yourLoc))
I heard that it will fix it somewhere..

i need distance also like 20-25 idk i dont remember how much
 
Irrelevant. Just use your normal GUI location variable, just replace the actual move action.

something like this if you want to try DSG's idea.
  • Actions
    • Set yourUnit = (Triggering unit)
    • Set yourLoc = (Position of yourUnit)
    • Custom script: call SetUnitX(udg_yourUnit , GetLocationX(udg_yourLoc))
    • Custom script: call SetUnitY(udg_yourUnit , GetLocationY(udg_yourLoc))
 
Status
Not open for further replies.
Back
Top