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

animation vs distance travel spell

Status
Not open for further replies.
Level 3
Joined
Jun 9, 2010
Messages
17
guys..good day..

need help a bit concerning the above matter as I've been playing around with the trigger editor but the result is still disappointing.

The thing is I cannot figure out the best calculation how to compute the percentage of animation speed with regards to the distance travel by the caster.

for instance, the overall time taken for death animation of the caster is 4 sec.The speed of the travel is constant but the distance varies dependent on the caster position and target location. I want to make sure the whole death animation is complete regardless how far the distance of the travel. That's mean if the distance is short, the death animation will be very fast and if the distance is far then the animation will be slow.

What will be the best percentage of animation speed (formula) to put in "Change unit's animation speed to ___% of its original speed" action to execute the above scenario?..or is there any other way to do it?

Thanks in advance guys :)
 
I'm not sure if this is right but a simple formula like this might work.

Try movement speed / distance between points
That might turn into the desired time. If not you have to find how much distance is traveled at what speed. To do this give the unit a 100 distance and 100 speed. Then trigger it with a loop trigger to keep track of time and see how long it takes for the unit to go that distance. Hopefully the first formula will work.
 
I think it is a hundred range per second at 100 MS. Also, since the anim is 4 secs, 4 should also be a factor in the formula.

S = D/T
T = D/S
D = S*T

For the actual formula, I think the distance has no use. Only the time.. First, solve for the time, then do this

(AnimDuration/Time) x 10 = AnimSpeed
 
Level 3
Joined
Jun 9, 2010
Messages
17
Thanks for the quick and kind reply guys..

please find my reply below


I don't understand what you want XD !
Infact a caster plays a death animation oO ?

me: it's not a death animation..really :vw_death:..just taking one simple animation name haha


If not you have to find how much distance is traveled at what speed. To do this give the unit a 100 distance and 100 speed. Then trigger it with a loop trigger to keep track of time and see how long it takes for the unit to go that distance. Hopefully the first formula will work.

me: I don't think giving the unit movement speed of 100 is necessary as the speed of the travel is in a looped trigger. Just a basic slide trigger as per below:

event: Time - Every 0.03 seconds of game time
action:
Set AT_Sloc[1] = (Position of AT_Caster)

Set AT_Sloc[2] = (AT_Sloc[1] offset by 35.00 towards (Facing of AT_Caster) degrees)

Unit - Move AT_Caster instantly to AT_Sloc[2]

this is the trigger part that reflect the speed of the travel. From this trigger, I would say the speed (S = D / t) will be 1166.67 (35/0.03) which is constant regardless how far the caster is travelling. Thus, in a second, the unit will be traveling about 1166.67 point of distance.

(AnimDuration/Time) x 10 = AnimSpeed

me: I don't get it dude...why do we have to multiply by 10?

I still think that, we just have to put a correct formula in the blank below

Animation - Change (Triggering unit)'s animation speed to ______% of its original speed

and we should get the thing done. It looks simple and I think I'm quite close to get it but still end up to failures.

Should you guys have some examples of trigger that i can refer and study to..it'll be nice and I appreciate it so much...

Thanks guys.
 
100 would add.. two zeros..

Think about it. For example;

AnimSpeed = 4 secs
TravelTime = 12 secs

4/12 = 3.33 x 10 = 33.3% speed

this is the trigger part that reflect the speed of the travel. From this trigger, I would say the speed (S = D / t) will be 1166.67 (35/0.03) which is constant regardless how far the caster is travelling. Thus, in a second, the unit will be traveling about 1166.67 point of distance.

Nope, think of it this way; it repeats 33 times a second ( 1.00/ 0.03 = 33) so

33 x 35 = 1155

Its speed is 1155.
You have to calculate upon cast 'Distance between Points'
Then, divide the distance by the speed to get the time.
Finally, get the AnimSpeed by doing the formula.
 
Level 3
Joined
Jun 9, 2010
Messages
17
100 would add.. two zeros..

Think about it. For example;

AnimSpeed = 4 secs
TravelTime = 12 secs

4/12 = 3.33 x 10 = 33.3% speed



Nope, think of it this way; it repeats 33 times a second ( 1.00/ 0.03 = 33) so

33 x 35 = 1155

Its speed is 1155.
You have to calculate upon cast 'Distance between Points'
Then, divide the distance by the speed to get the time.
Finally, get the AnimSpeed by doing the formula.


Dude..it works wonder..I'm amazed that you could resolve it very quickly...i just tweak your formula a bit to suit it to my liking...

thank you so much!!
 
Status
Not open for further replies.
Top