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

[Spell] Charge with animation

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2011
Messages
326
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
 
Level 8
Joined
Nov 9, 2011
Messages
326
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
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
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.
Top