• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help in Calculation

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,108
Hello Hivers!

I need help in calculating gradual growth of the damage.

This is the trigger I currently have:
  • Telekinesis Loop
    • Events
      • Time - Every 0.03 seconds of game time
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • -------- ================================================ --------
      • For each (Integer T_Loop) from 1 to T_MaxIndex, do (Actions)
        • Loop - Actions
          • -------- ================================================ --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • T_Time[T_Loop] Greater than or equal to 99.00
              • (Ordered unit) Equal to T_TrigUnit[T_Loop]
            • Then - Actions
            • Else - Actions
              • -------- ================================================ --------
              • Set T_Time[T_Loop] = (T_Time[T_Loop] + 0.03)
              • Set T_MaxDamage[T_Loop] = (((Real(T_SpellLvl[TF_Loop])) x 1000.00) / 33.30)
              • -------- ================================================ --------
      • -------- ================================================ --------
The spell can be channeled up to 3 seconds. During that channel, the damage increases up to "((Real(T_SpellLvl[TF_Loop])) x 1000.00)", so up to 1000, 2000, 3000, 4000, 5000 if casted all 3 seconds. What should I do to make it how do I say... grow properly, equal to the amount of duration channeled, up to "((Real(T_SpellLvl[TF_Loop])) x 1000.00)"? By what should I divide that number?

Tell me if you didn't understand it, I'll try to explain better.
 
Last edited:
Level 30
Joined
Sep 26, 2009
Messages
2,622
Divide it by 33.3. If an event fires every 0.03 seconds, it fires ~33.3 times more often than a 1.00 event. (1.00/0.03 = ~33.3).

Edit: I'm a bit confused by the presented trigger, I assume it's not the whole trigger. Reading your post again, it seems you want to increase the damage periodically. Since you want to increase it 5 times within 3 seconds, it means you should increase it every 0.6 seconds (3/5 = 0.6). So the same applies by what I wrote before, but instead of diving number 1.00 by 0.03, you should divide 0.6 by 0.03, which is exactly 20. So divide it by 20 I guess?
 
Level 18
Joined
May 11, 2012
Messages
2,108
Don't be mislead by that "Time". I use that for something else.
I want the damage to properly grow gradually from 0 to the 1000*level of the spell.

I'm not sure how should I perform the calculation.

I do not want to have limit on how many times to increase it during 3 seconds. I want it to increase every 0.03 second up to maximum amount. Maybe I should divide it, maybe subtract from, the problem is, I do not know xD

I have updated the trigger, and this is whole trigger for now.
 
Level 6
Joined
Oct 31, 2014
Messages
170
Can you actualy use the channeling time in a trigger ?
If you stop channeling... the spell doesn't launch at all so ...
 
Level 18
Joined
May 11, 2012
Messages
2,108
Oh I forgot about this thread of mine lol.
Anyway, Chaosy, I will try that. =)

Molaf, what do mean? Am I not using the channeling time in a trigger?
And it would be rather simple to do it like that. I want it abit advanced. =)
 
Status
Not open for further replies.
Top