• 🏆 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!

Cosmic Vortex

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
I present my new spell, I call it cosmic vortex, I used a model of the page (Ghost Bolt) for the model of a dummy.

My language is not English, to translate all the texts I used google translate.

Sorry for the mistakes in the texts.


cosmicvortex.jpg





  • Events
    • Unit - A unit Starts the effect of a skill
  • Terms
    • (Ability Being cast) Equal to Cosmic Vortex
  • Actions
    • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
      • Si: Conditions
        • A_Index [0] Equal to 0
      • Then: Actions
        • Trigger - Turn on Cosmic Vortex Loop Dummy <gen>
        • Trigger - Turn on Cosmic Vortex Loop Damage <gen>
      • Other: Shares
    • Set A_Index [0] = (A_Index [0] + 1)
    • A_Index Set [1] = (A_Index [1] + 1)
    • Set A_Caster [A_Index [1]] = (Triggering unit)
    • Set A_Bail1 [A_Index [1]] = False
    • Set A_Bail2 [A_Index [1]] = True
    • Set A_Enlarge1 [A_Index [1]] = True
    • Set A_Enlarge2 [A_Index [1]] = False
    • Set A_Level [A_Index [1]] = (Level of (Ability Being cast) for (Triggering unit))
    • Set A_AngularVelocity [A_Index [1]] = 10.00
    • Set A_SpeedSpacer [A_Index [1]] = 15.00
    • Set A_Distance1 [A_Index [1]] = 49.00
    • Set A_Distance2 [A_Index [1]] = (201.00 + (150.00 x (Real (A_Level [A_Index [1 ]]))))
    • Set A_DistanceCircle [A_Index [1]] = (201.00 + (150.00 x (Real (A_Level [A_Index [1 ]]))))
    • Set A_Duration [A_Index [1]] = (4.00 x (Real (A_Level [A_Index [1 ]])))
    • Set A_Time [A_Index [1]] = 0.00
    • Set A_Attributes [A_Index [1]] = ((Strength of (Triggering unit) (includes bonus)) + ((Agility of (Triggering unit) (includes bonus)) + (Intelligence of (Triggering unit) (includes bonus))) )
    • Set A_Damage [A_Index [1]] = (Real ((A_Attributes [A_Index [1]] x A_Level [A_Index [1 ]])))
    • For each (Integer A_IndexDummy1 [1]) from 1 to 12, do (Actions)
      • Loop: Actions
        • Set A_Angle [A_IndexDummy1 [1]] = (30.00 x (Real (A_IndexDummy1 [1])))
        • Unit - Create 1 DummyVortex for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by A_Distance1 [A_Index [1]] Towards A_Angle [A_IndexDummy1 [1]] degrees) degrees Facing default Vista building
        • Set A_Dummy1 [((A_IndexDummy1 [1] x 12) - A_Index [1])] = (Last created unit)
    • For each (Integer A_IndexDummy2 [1]) from 1 to 12, do (Actions)
      • Loop: Actions
        • Unit - Create 1 DummyVortex for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by A_Distance2 [A_Index [1]] Towards A_Angle [A_IndexDummy2 [1]] degrees) degrees Facing default Vista building
        • Set A_Dummy2 [((A_IndexDummy2 [1] x 12) - A_Index [1])] = (Last created unit)
    • For each (Integer A_IndexCircle [1]) from 1 to 12, do (Actions)
      • Loop: Actions
        • Unit - Create 1 DummyCircle for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by A_DistanceCircle [A_Index [1]] Towards A_Angle [A_IndexCircle [1]] degrees) degrees Facing default Vista building
        • Set A_DummyCircle [((A_IndexCircle [1] x 12) - A_Index [1])] = (Last created unit)
    • Set A_True [A_Index [1]] = True


  • Events
    • Time - Every 0.05 seconds of game time
  • Conditions
  • Actions
    • For each (Integer A_Index [2]) from 1 to A_Index [1], do (Actions)
      • Loop: Actions
        • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
          • Si: Conditions
            • A_True [A_Index [2]] Equal to True
          • Then: Actions
            • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
              • Si: Conditions
                • A_Duration [A_Index [2]] Greater than 0.00
              • Then: Actions
                • Set A_Duration [A_Index [2]] = (A_Duration [A_Index [2]] - 0.05)
                • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                  • Si: Conditions
                    • A_Enlarge1 [A_Index [2]] Equal to True
                  • Then: Actions
                    • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                      • Si: Conditions
                        • A_Distance1 [A_Index [2]] Greater than A_DistanceCircle [A_Index [2]]
                      • Then: Actions
                        • Set A_Bail1 [A_Index [2]] = True
                        • Set A_Enlarge1 [A_Index [2]] = False
                      • Other: Actions
                        • Set A_Distance1 [A_Index [2]] = (A_Distance1 [A_Index [2]] + A_SpeedSpacer [A_Index [2]])
                  • Other: Actions
                • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                  • Si: Conditions
                    • A_Enlarge2 [A_Index [2]] Equal to True
                  • Then: Actions
                    • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                      • Si: Conditions
                        • A_Distance2 [A_Index [2]] Greater than A_DistanceCircle [A_Index [2]]
                      • Then: Actions
                        • Set A_Bail2 [A_Index [2]] = True
                        • Set A_Enlarge2 [A_Index [2]] = False
                      • Other: Actions
                        • Set A_Distance2 [A_Index [2]] = (A_Distance2 [A_Index [2]] + A_SpeedSpacer [A_Index [2]])
                  • Other: Actions
                • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                  • Si: Conditions
                    • A_Bail1 [A_Index [2]] Equal to True
                  • Then: Actions
                    • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                      • Si: Conditions
                        • A_Distance1 [A_Index [2]] Less than 50.00
                      • Then: Actions
                        • Set A_Bail1 [A_Index [2]] = False
                        • Set A_Enlarge1 [A_Index [2]] = True
                      • Other: Actions
                        • Set A_Distance1 [A_Index [2]] = (A_Distance1 [A_Index [2]] - A_SpeedSpacer [A_Index [2]])
                  • Other: Actions
                • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                  • Si: Conditions
                    • A_Bail2 [A_Index [2]] Equal to True
                  • Then: Actions
                    • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                      • Si: Conditions
                        • A_Distance2 [A_Index [2]] Less than 50.00
                      • Then: Actions
                        • Set A_Bail2 [A_Index [2]] = False
                        • Set A_Enlarge2 [A_Index [2]] = True
                      • Other: Actions
                        • Set A_Distance2 [A_Index [2]] = (A_Distance2 [A_Index [2]] - A_SpeedSpacer [A_Index [2]])
                  • Other: Actions
                • For each (Integer A_IndexDummy1 [2]) from 1 to 12, do (Actions)
                  • Loop: Actions
                    • Set A_Angle [A_IndexDummy1 [2]] = (A_Angle [A_IndexDummy1 [2]] + A_AngularVelocity [A_Index [2]])
                    • Unit - Move A_Dummy1 [((A_IndexDummy1 [2] x 12) - A_Index [2])] Instantly to ((Position of A_Caster [A_Index [2]]) offset by A_Distance1 [A_Index [2]] Towards A_Angle [A_IndexDummy1 [2 ]] degrees)
                • For each (Integer A_IndexDummy2 [2]) from 1 to 12, do (Actions)
                  • Loop: Actions
                    • Unit - Move A_Dummy2 [((A_IndexDummy2 [2] x 12) - A_Index [2])] Instantly to ((Position of A_Caster [A_Index [2]]) offset by A_Distance2 [A_Index [2]] Towards A_Angle [A_IndexDummy2 [2 ]] degrees)
                • For each (Integer A_IndexCircle [2]) from 1 to 12, do (Actions)
                  • Loop: Actions
                    • Unit - Move A_DummyCircle [((A_IndexCircle [2] x 12) - A_Index [2])] Instantly to ((Position of A_Caster [A_Index [2]]) offset by A_DistanceCircle [A_Index [2]] Towards A_Angle [A_IndexCircle [2 ]] degrees)
                • Destructible - Pick Every destructible Within A_DistanceCircle [A_Index [2]] of (Position of A_Caster [A_Index [2]]) and do (Actions)
                  • Loop: Actions
                    • Destructible - Kill (Picked destructible)
              • Other: Actions
                • For each (Integer A_IndexDummy1 [2]) from 1 to 12, do (Actions)
                  • Loop: Actions
                    • Unit - Explode A_Dummy1 [((A_IndexDummy1 [2] x 12) - A_Index [2])]
                • For each (Integer A_IndexDummy2 [2]) from 1 to 12, do (Actions)
                  • Loop: Actions
                    • Unit - Explode A_Dummy2 [((A_IndexDummy2 [2] x 12) - A_Index [2])]
                • For each (Integer A_IndexCircle [2]) from 1 to 12, do (Actions)
                  • Loop: Actions
                    • Unit - Explode A_DummyCircle [((A_IndexCircle [2] x 12) - A_Index [2])]
                • Set A_Bail1 [A_Index [2]] = False
                • Set A_Bail2 [A_Index [2]] = False
                • Set A_Enlarge1 [A_Index [2]] = False
                • Set A_True [A_Index [2]] = False
                • Set A_Enlarge2 [A_Index [2]] = False
                • Set A_Index [0] = (A_Index [0] - 1)
          • Other: Actions
    • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
      • Si: Conditions
        • A_Index [0] Equal to 0
      • Then: Actions
        • A_Index Set [1] = 0
        • Trigger - Turn off (This trigger)
      • Other: Actions


  • Events
    • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A_Index [2]) from 1 to A_Index [1], do (Actions)
        • Loop: Actions
          • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
            • Si: Conditions
              • A_True [A_Index [2]] Equal to True
            • Then: Actions
              • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                • Si: Conditions
                  • A_Duration [A_Index [2]] Greater than 0.00
                • Then: Actions
                  • Unit Group - Pick Every unit in (Units Within A_DistanceCircle [A_Index [2]] of (Position of A_Caster [A_Index [2]])) and do (Actions)
                    • Loop: Actions
                      • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
                        • Si: Conditions
                          • And - All (Conditions) Are true
                            • Conditions
                              • ((Picked unit) is A structure) Equal to False
                              • ((Picked unit) is alive) Equal to True
                              • ((Picked unit) Belongs to an enemy of (Owner of A_Caster [A_Index [2]])) Equal to True
                        • Then: Actions
                          • Floating Text - Create floating That text reads (- + ((String ((Integer (A_Damage [A_Index [2 ]])))) +!)) At (Position of (Picked unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% Transparency
                          • Floating Text - Change (Last created floating text): Disable stays
                          • Floating Text - Set the velocity of (Last created floating text) to 90.00 degrees Towards 100.00
                          • Floating Text - Change the fading age of (Last created floating text) to 1.20 seconds
                          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                          • Unit - Create 1 DummyDamage for (Owner of A_Caster [A_Index [2]]) at (Position of (Picked unit)) degrees Facing default Vista building
                          • Unit - Kill (Last created unit)
                          • Unit - Cause A_Caster [A_Index [2]] to damage (Picked unit), dealing A_Damage [A_Index [2]] Damage of attack type Spells and damage "type Normal
                        • Other: Actions
                • Other: Actions
            • Other: Actions



Keywords:
vortex, cosmic, dummy, circle, much, damage, factor, speed, velocity, hiveworkshop, top, spell, nive, every, pikachu, dbz, dragon, ball, z, warcraft,
Contents

Cosmic Vortex (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. Bribe: Plenty of leaks for everyone. This is a goldmine of leaks: For each (Integer A_IndexDummy1[1]) from 1 to 12 do (Actions) Loop - Actions Set A_Angle[A_IndexDummy1[1]]...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.

Bribe:

Plenty of leaks for everyone. This is a goldmine of leaks:

  • For each (Integer A_IndexDummy1[1]) from 1 to 12 do (Actions)
    • Loop - Actions
      • Set A_Angle[A_IndexDummy1[1]] = (30.00 x (Real(A_IndexDummy1[1])))
      • Unit - Create 1 DummyVortex for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by A_Distance1[A_Index[1]] towards A_Angle[A_IndexDummy1[1]] degrees) facing Default building facing degrees
      • Set A_Dummy1[((A_IndexDummy1[1] x 12) - A_Index[1])] = (Last created unit)
  • For each (Integer A_IndexDummy2[1]) from 1 to 12 do (Actions)
    • Loop - Actions
      • Unit - Create 1 DummyVortex for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by A_Distance2[A_Index[1]] towards A_Angle[A_IndexDummy2[1]] degrees) facing Default building facing degrees
      • Set A_Dummy2[((A_IndexDummy2[1] x 12) - A_Index[1])] = (Last created unit)
  • For each (Integer A_IndexCircle[1]) from 1 to 12 do (Actions)
    • Loop - Actions
      • Unit - Create 1 DummyCircle for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by A_DistanceCircle[A_Index[1]] towards A_Angle[A_IndexCircle[1]] degrees) facing Default building facing degrees
      • Set A_DummyCircle[((A_IndexCircle[1] x 12) - A_Index[1])] = (Last created unit)
A_Index[1] should be a normal variable. It will be a lot more readable and run a lot faster in-game.

Same with A_Index[2] in the next trigger.

Another treasure trove of location leaks here:

  • For each (Integer A_IndexDummy1[2]) from 1 to 12 do (Actions)
    • Loop - Actions
      • Set A_Angle[A_IndexDummy1[2]] = (A_Angle[A_IndexDummy1[2]] + A_AngularVelocity[A_Index[2]])
      • Unit - Move A_Dummy1[((A_IndexDummy1[2] x 12) - A_Index[2])] instantly to ((Position of A_Caster[A_Index[2]]) offset by A_Distance1[A_Index[2]] towards A_Angle[A_IndexDummy1[2]] degrees)
  • For each (Integer A_IndexDummy2[2]) from 1 to 12 do (Actions)
    • Loop - Actions
      • Unit - Move A_Dummy2[((A_IndexDummy2[2] x 12) - A_Index[2])] instantly to ((Position of A_Caster[A_Index[2]]) offset by A_Distance2[A_Index[2]] towards A_Angle[A_IndexDummy2[2]] degrees)
  • For each (Integer A_IndexCircle[2]) from 1 to 12 do (Actions)
    • Loop - Actions
      • Unit - Move A_DummyCircle[((A_IndexCircle[2] x 12) - A_Index[2])] instantly to ((Position of A_Caster[A_Index[2]]) offset by A_DistanceCircle[A_Index[2]] towards A_Angle[A_IndexCircle[2]] degrees)
      • Destructable - Pick every destructible within A_DistanceCircle[A_Index[2]] of (Position of A_Caster[A_Index[2]]) and do (Actions)
        • Loop - Actions
          • Destructable - Kill (Picked destructible)
Needs a good amount of work. You can ask for help making your triggers leakless here: http://www.hiveworkshop.com/forums/triggers-scripts-269/
 
Level 11
Joined
Mar 18, 2009
Messages
788
I think I just massacred an entire Eco-system :hohum:

EDIT:
Creates a vortex which moves without stopping, causing damage with regard to strength, agility and intelligence of the hero. Summarizing the effect of this skill, you could say that the unit enters the circle of the vortex is destroyed.

Level: 1/2/3/4.

Damage: STR+AGI+INT x 1/2/3/4.
Every: 0.5 seconds.
Duration: 4/8/12/16 seconds.
Max distance: 350/500/650/800 units.

Mana Cost: 100/150/200/250.
Cooldown: 20 seconds.

Sry about the colors being wrong.
 
Level 10
Joined
Apr 25, 2009
Messages
296
Merge the loops, use .03, not .05....

Position of (Unit) leaks... use a variable and destroy the variable...

"Vista building" = ?

I'd set [A_Index [2]] to a variable to make it look neater...

Set (Triggering Unit) to a variable...

There has to be a way to merge the If/Then/Else actions, as the 'Else' action seems to be the same.

Remove the 850 KB of stuff.


Remarkably similar to Maker's Omega Wave...
 
Imports unless EXTREMELY NEEDED is unwelcome on spell resources...

you didn't even wrote on the desc, who made that model...

and use IN-game screenshot....

I think Marcos isn't saying that this isn't your spell, what he's saying from what I understand is that the idea wasn't original...

A_INDEX[] array should be replaced by three different variables, as the presence of that array where you only use the indexes 0,1,2, greatly reduces performance...
 
Level 11
Joined
Mar 18, 2009
Messages
788
It's reaally me man. :s,

He meant the spell's originality (the fact that some one else might have done something similar)

I don't know that spell. this is originally from me.

I believe you are very demanding

I simply Copy+Paste it form your in-game description so that people could read it here on the Hive, this is your spell right?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
In my opinion you should get rid of all imports, they're not needed.
The tooltip has too many colours to my liking.
The disbtn icon has wrong path.
You leak locations:
  • Unit - Create 1 DummyVortex for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by A_Distance1[A_Index[1]] towards...
^That alone leaks two locations, the position of unit and the offset point.
The loop time should be 0.03 IMO, 0.05 makes it not look smooth due to low update rate.
Do this check only after you actually reduce the integer:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • A_Index[0] Equal to 0
    • Then - Actions
      • Set A_Index[1] = 0
      • Trigger - Turn off (This trigger)
    • Else - Actions
Leaks:
  • Unit - Move A_Dummy1[((A_IndexDummy1[2] x 12) - A_Index[2])] instantly to ((Position of A_Caster[A_Index[2]]) offset by...
Unit group leak, location leak:
  • Unit Group - Pick every unit in (Units within A_DistanceCircle[A_Index[2]] of (Position of A_Caster[A_Index[2]])) and do (Actions)
This
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Picked unit) is A structure) Equal to False
          • ((Picked unit) is alive) Equal to True
          • ((Picked unit) belongs to an enemy of (Owner of A_Caster[A_Index[2]])) Equal to True
works the same as
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Picked unit) is A structure) Equal to False
      • ((Picked unit) is alive) Equal to True
      • ((Picked unit) belongs to an enemy of (Owner of A_Caster[A_Index[2]])) Equal to True
^Get rid of the extra and, it adds unneeded code.
Leaks:
  • Floating Text - Create floating text that reads (- + ((String((Integer(A_Damage[A_Index[2]])))) + !)) at (Position of (Picked unit)) with...
  • Unit - Cause A_Caster[A_Index[2]] to damage (Picked unit), dealing A_Damage[A_Index[2]] damage of attack type Spells and damage type Normal
The spell is kind of effect heavy, maybe too much.
32 dummies for one ability is kind of much.
The spell is not fully MUI, try casting it with three paladins almost at the same time. Good testing methiod is to slow down the game speed, select all paladins and cast the ability on them, use alt to change to next unit. You might be overwriting the dummy units, overlapping indexes.


With that said I still like the spell, it's ok but maybe there's too much going on. Fix the leaks and it not being MUI.
 
  • ((Position of (Triggering unit))
^This leaks

Store every location in a variable to destroy later :)


You're repeating many function calls.
Try storing data in variables so you could improve efficiency :)

For example:
  • Set u = (Triggering Unit)
  • Set p = (Triggering Player)
This way, you don't have to call functions more than once ^^
This really boosts performance (GUI needs all the help it can get :p)
 
Top