Archimedean spiral formula??

Happy

Well-Known Member
Reaction score
71
hey guys...

i need to be able to create a archimedean spiral for a spell i wanna make... the problem is i dont have a clue how to make the formula in wc3....

an archimedean spiral


could anyone make a formula for me?

thanks in advance

greetz happy
 

Zanderist

New Member
Reaction score
5
I just made one as my first custom spell.

Use the Divine shield spell.
http://www.thehelper.net/forums/attachment.php?attachmentid=36068&d=1268696396

Oh yeah and when you open it change the current trigger to the one below...it makes a cooler finish.

Trigger:
  • Speical Effect end
    • Events
    • Conditions
    • Actions
      • Animation - Reset Unit's animation
      • Environment - Create a 4.00 second Normal ripple deformation at (Position of Unit) with starting radius 0.00, ending radius 732.87, and depth 32.00, using 1.00 second ripples spaced 512.00 apart
      • Wait 4.00 seconds
      • Unit Group - Pick every unit in (Units within 732.87 of (Position of Unit)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Not equal to Unit
            • Then - Actions
              • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
              • Unit - Kill (Picked unit)
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • For each (Integer A) from 1 to SpeicalEffectInteger, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy SpeicalEffect[(Integer A)]
      • For each (Integer A) from 1 to Fire_EffectNumber, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy Fire_Effect[(Integer A)]
      • Set x = 0.00
      • Set y = 0.00
      • Set z = 0.00
      • Set Unit = No unit
      • Set Fire_EffectNumber = 0
      • Set SpeicalEffectInteger = 0
      • Trigger - Turn on Unit Uses the Spell <gen>
      • Trigger - Turn on Clear <gen>
      • Do nothing


There's still some bugs in that spell, for example if you put in units that are an enemy to red the pally will attack them as the spell is being cast.
 

Ayanami

칼리
Reaction score
288
Okay, let me explain how circle formula works in World Editor first. Here's a typical trigger that makes a dummy unit go around a point in a circular manner. Let's say Caster is the unit in which you want the dummy to circle around it. TempReal is initially any value that you desire. Dummy is the dummy that you want to move it in circles.

Trigger:
  • Circle
    • Events
      • Time - Every 0.03 seconds of game time
    • Actions
      • Set TempPoint = (Position of Caster)
      • Set TempOffset = (TempPoint offset by 500.00 towards TempReal degrees)
      • Unit - Move Dummy instantly to TempOffset
      • Set TempReal = (TempReal + 7.20)
      • call RemoveLocation(udg_TempOffset)
      • call RemoveLocation(udg_TempPoint)


Basically, this trigger would cause Dummy to move around Caster in a circular manner, constantly 500 distance units away from the Caster. 1 round would take 1.50 seconds to complete. Now, making a spiral motion isn't very different. Except, we introduce another real variable called "TempDistance". TempDistance must initially be 0.00.

Trigger:
  • Spiral
    • Events
      • Time - Every 0.03 seconds of game time
    • Actions
      • Set TempPoint = (Position of Caster)
      • Set TempOffset = (TempPoint offset by TempDistance towards TempReal degrees)
      • Unit - Move Dummy instantly to TempOffset
      • Set TempReal = (TempReal + 7.20)
      • Set TempDistance = (TempDistance + 10.00)
      • call RemoveLocation(udg_TempOffset)
      • call RemoveLocation(udg_TempPoint)


Basically, this trigger would cause the Dummy to move around Caster in a spiral manner. Similar to the circle trigger, it would take 1.50 seconds to complete 1 round. However, notice that the offset distance varies every 0.03 seconds. This means that the 1st time the periodic trigger is ran, the Dummy is initially 0.00 distance units away from the Caster. After the 10th run of the periodic trigger, the Dummy would be 100.00 distance units away from Caster. Thus, after 1 round, Dummy would eventually be 500.00 distance units away from Caster.

Hope this helps.
 

Zanderist

New Member
Reaction score
5
Here's a question, that spiral starts from the center the end, what about starting at the end and ending at the center?
 

Ayanami

칼리
Reaction score
288
Here's a question, that spiral starts from the center the end, what about starting at the end and ending at the center?

For that, all you have to do is start with the max value of TempDistance that you want. Then, periodically, just decrease the value of TempDistance.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top