• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Animation set to Point?

Status
Not open for further replies.

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Imitating excact unit animation given sequence and interval on another unit seems troublesome.
"Fading trail" is not really anything new tho, and to achieve such effect you do not actually new to be perfect.

Most of such "trails" involve creating dummy units that are added into periodic loop to apply contant "fading" effect. Such dummy has its animation set either by Queue/SetUnitAnimation or SetUnitAnimationByIndex function.
 
If you want to know the general "tactic" behind those fade spells, it generally goes like this:

(1) calculate where the unit is going to go, and calculate the amount of faded "dummies" you'll need
(2) have all of them play their animations, but hide them all (or set their alpha to 0 using the Animation - Set Vertex color)
(3) whenever you display one of the "faded" units, just pause its animation. That way, all the dummies will be at different stages in the animation, synchronized with the caster unit.
 
Status
Not open for further replies.
Top