Math-related problem

Leazy

You can change this now in User CP.
Reaction score
50
Hello!

I downloaded this model: http://www.hiveworkshop.com/forums/models-530/progressbardummy-218777/

It is a progress bar dummy which takes 1 second to fully load. Now I need help to decide the formula to decide the animation speed depending on the casting time. As I mentioned, the loading time is 1 second at 100% animation speed. How should I transfer this:

Animation - Change (Last created unit)'s animation speed to (100.00 x CastingBar_CastingTime[(Custom value of Caster)])% of its original speed

I understand this is incorrect, but I need help to decide the formula to get the right animation speed depending on CastingBar_CastingTime[((Custom value of Caster)], so if CastingBar_CastingTime is 3 sec, the animation speed should be converted to 33% (takes 3 times as long) and if it is 2 sec the animation speed should be 50% (twice as slow).
 

maxou

You can change this now in User CP.
Reaction score
15
Take the casting time, and divide the 100% by the casting time, nothing really hard.
If you have a casting time of 10s, it will be : 100.00 / 10.00 = 10.00, set speed to 10.00%.
If you have a casting time of 3.5s it will be : 100.00 / 3.50 ~ 28.57, set speed to 28.57%.
 

Leazy

You can change this now in User CP.
Reaction score
50
Of course, I should have thought of that :) Thanks m8!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top