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

Simple Spin Ability - v1.1 [eleljrk]

This is my first released spell.. Thats becouse of the MUI and how simple it is. This is leakless, laggless, MUI, easy (very easy) and you can add unlimited with levels, with just a few adds!


///////////////////////////////////////////////////////////////////////////////////
// Call some winds and magical forces to spin the enemies in a targeted area. //
// It spins and spins untill the units dies, they get out from the magical area or //
// the magic ends. This is good at holding enemies close to you while you can //
// attack, killing large groups or just having fun. //
// //
// Level 1 - 80-200 total damage to units in AoE 250. Lasts 5 seconds. //
// Level 2 - 200-500 total damage to units in AoE 350. Lasts 10 seconds. //
// Level 3 - 500-750 total damage to units in AoE 500. Lasts 15 seconds. //
///////////////////////////////////////////////////////////////////////////////////

Version Log:

Version 1.0
By: eleljrk
Thanks to: Billy the Cat

- First release

Version 1.1
By: eleljrk
Thanks to: Shdow89

- Fixed a leak
- Changed the effect
- Made "Cast" trigger more "good looking"

////////////////////////////////////////////////////////////////////////////////////////////////////
//
// HOW TO IMPORT:
// Copy "The Spell" folder, then open your map in "Open" or "Open As", or maby you got a tab open, then click Window -> Your map name
//
// Now, you have to enabled "Automatically create unknown variables while pasting trigger data".
// You can enable that by: File -> Preferences -> General -> Then Check: "Automatically create unknown variables while pasting trigger data"!
//
// Now open your Trigger Editor and Paste the Folder there, there is a chance that not all triggers are enabled, enabled them by looking over the triggers and open // disabled Actions and then hit OK, if that wont work, take a better look on this map and learn what to do.
//
// Enjoy, your spell is Imported to your map!
//
////////////////////////////////////////////////////////////////////////////////////////////////////



Orginal by: eleljrk

Thanks to: Billy the Cat, Shdow89
Models: Ehmm.. None? :S The Dummy is unknown Author


How to add a Level:
In the Settings, just add the Time, Damage and Range with 1 more Set Variable Action, and set the Array to 4. Then go to the Object Editor and add 1 level.
Make the level to your liking, and then you are done! Isnt that simple?

Questions, suggestions, reviews, help and other will be.. helpfull! Please come with comments! :)

Here is the Triggers:


  • Settings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- This is the unit that will make units spin --------
      • -------- I recommand to use the Model in the Import Manager on this dummy --------
      • Set ele_Dummy = Dummy
      • -------- This is the unit that will make the AoE marking. --------
      • Set ele_Dummy2 = Dummy2
      • -------- This is the Dummy unit that will run the Spell and start the action. --------
      • Set ele_Ability = Spin
      • -------- This will set the damage of each level --------
      • -------- Each level will be the Array, all you need to add after the Array is in the Object Editor. --------
      • Set ele_Damage[1] = 0.50
      • Set ele_Damage[2] = 0.75
      • Set ele_Damage[3] = 1.00
      • -------- This is the duration time of this spell. --------
      • -------- Each level will be the Array, all you need to add after the Array is in the Object Editor. --------
      • Set ele_Time[1] = 5.00
      • Set ele_Time[2] = 10.00
      • Set ele_Time[3] = 15.00
      • -------- This is the range (AoE) of this spell. All units in this area will be damaged. --------
      • -------- Each level will be the Array, all you need to add after the Array is in the Object Editor. --------
      • Set ele_Range[1] = 250.00
      • Set ele_Range[2] = 350.00
      • Set ele_Range[3] = 500.00


  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ele_Ability
    • Actions
      • Set ele_TempLoc = (Target point of ability being cast)
      • Unit - Create 1 ele_Dummy for (Owner of (Triggering unit)) at ele_TempLoc facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to (Level of ele_Ability for (Triggering unit))
      • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
      • For each (Integer ele_LoopInteger) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards ((Real(ele_LoopInteger)) x 45.00) degrees)
          • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
          • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_ele_TempLight)
      • Custom script: call RemoveLocation(udg_ele_TempLoc)


  • Spell
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set ele_TempGroup = (Units of type ele_Dummy)
      • Unit Group - Pick every unit in ele_TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Set ele_TempUnit = (Picked unit)
              • Set ele_TempLoc = (Position of ele_TempUnit)
              • Set ele_TargetGroup = (Units within ele_Range[(Custom value of ele_TempUnit)] of ele_TempLoc)
              • Custom script: call RemoveLocation(udg_ele_TempLoc)
              • Unit Group - Pick every unit in ele_TargetGroup and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is alive) Equal to True
                      • ((Picked unit) belongs to an enemy of (Owner of ele_TempUnit)) Equal to True
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) is A flying unit) Equal to False
                      • ((Picked unit) is Magic Immune) Equal to False
                    • Then - Actions
                      • Unit - Cause ele_TempUnit to damage (Picked unit), dealing ele_Damage[(Custom value of ele_TempUnit)] damage of attack type Magic and damage type Magic
                      • Set ele_TempLoc = (Position of (Picked unit))
                      • Special Effect - Create a special effect at ele_TempLoc using Abilities\Spells\NightElf\SpiritOfVengeance\SpiritOfVengeanceOrbs1.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Set ele_TargetLoc = (ele_TempLoc offset by (Random real number between 5.00 and 10.00) towards ((Facing of (Picked unit)) + (Random real number between 0.00 and 45.00)) degrees)
                      • Unit - Move (Picked unit) instantly to ele_TargetLoc
                      • Custom script: call RemoveLocation(udg_ele_TargetLoc)
                      • Set ele_TargetLoc = (ele_TempLoc offset by 50.00 towards ((Facing of (Picked unit)) + 45.00) degrees)
                      • Unit - Make (Picked unit) face ele_TargetLoc over 0.00 seconds
                      • Custom script: call RemoveLocation(udg_ele_TargetLoc)
                      • Custom script: call RemoveLocation(udg_ele_TempLoc)
                    • Else - Actions
                      • Unit Group - Remove (Picked unit) from ele_TargetGroup
              • Custom script: call DestroyGroup(udg_ele_TargetGroup)
              • Set ele_TempUnit = No unit
            • Else - Actions
              • Unit Group - Remove (Picked unit) from ele_TempGroup
              • Unit - Remove (Picked unit) from the game
      • Custom script: call DestroyGroup(udg_ele_TempGroup)



Keywords:
Simple, easy, spin, aoe, billy, the, cat, eleljrk, very, cool, super, fast, mark, MUI
Contents

SPIN!! (Map)

Reviews
18:06, 5th Jan 2010 The_Reborn_Devil: The triggers look ok and there are no leaks. Status: Approved Rating: Useful

Moderator

M

Moderator

18:06, 5th Jan 2010
The_Reborn_Devil:
The triggers look ok and there are no leaks.

Status: Approved
Rating: Useful
 

N.O

N.O

Level 6
Joined
Feb 20, 2009
Messages
200
Well not too bad of a spell but it does lag and horribly too...
 
Level 8
Joined
Jun 18, 2007
Messages
214
Alright, spell 'causes massive lag for me as well. But I know what the problem is.
You are not removing leaks on SFX here:
  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\AerialShackles\AerialShacklesTarget.mdl
. Because you're adding a special effect (attaching it on a unit), so using DestroyEffect, won't work like that. I suggest you just add SFX on a point, rather then unit, but if you're using it on a unit, then apply it once, and remove it after the spell is done. Use variables for this.

Second thing I found is (this is not a mistake, rather an improvement)
  • Actions
    • Set ele_TempLoc = (Target point of ability being cast)
    • Unit - Create 1 ele_Dummy for (Owner of (Triggering unit)) at ele_TempLoc facing Default building facing degrees
    • Unit - Set the custom value of (Last created unit) to (Level of ele_Ability for (Triggering unit))
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 0.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 45.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 90.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 135.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 180.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 225.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 270.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 315.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Custom script: call RemoveLocation(udg_ele_TempLoc)
This would be better of if you used a loop
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
And in it increase the reals for your dummy creation in a circle (Integer A + 45 let's say). It would save you code lanes, and you could make the runes variable (their numbers) in the settings.

Now my rating for this spell is 3/5. Hope this helps you.
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Alright, spell 'causes massive lag for me as well.
This would be better of if you used a loop
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
And in it increase the reals for your dummy creation in a circle (Integer A + 45 let's say). It would save you code lanes, and you could make the runes variable (their numbers) in the settings.

Now my rating for this spell is 3/5. Hope this helps you.

It has to be (Integer A x 45)
 
Level 9
Joined
Aug 27, 2009
Messages
473
Alright, spell 'causes massive lag for me as well. But I know what the problem is.
You are not removing leaks on SFX here:
  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\AerialShackles\AerialShacklesTarget.mdl
. Because you're adding a special effect (attaching it on a unit), so using DestroyEffect, won't work like that. I suggest you just add SFX on a point, rather then unit, but if you're using it on a unit, then apply it once, and remove it after the spell is done. Use variables for this.

Second thing I found is (this is not a mistake, rather an improvement)
  • Actions
    • Set ele_TempLoc = (Target point of ability being cast)
    • Unit - Create 1 ele_Dummy for (Owner of (Triggering unit)) at ele_TempLoc facing Default building facing degrees
    • Unit - Set the custom value of (Last created unit) to (Level of ele_Ability for (Triggering unit))
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 0.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 45.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 90.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 135.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 180.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 225.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 270.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Set ele_TempLight = (ele_TempLoc offset by ele_Range[(Level of ele_Ability for (Triggering unit))] towards 315.00 degrees)
    • Unit - Create 1 ele_Dummy2 for (Owner of (Triggering unit)) at ele_TempLight facing ele_TempLoc
    • Unit - Add a ele_Time[(Level of ele_Ability for (Triggering unit))] second Generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation(udg_ele_TempLight)
    • Custom script: call RemoveLocation(udg_ele_TempLoc)
This would be better of if you used a loop
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
And in it increase the reals for your dummy creation in a circle (Integer A + 45 let's say). It would save you code lanes, and you could make the runes variable (their numbers) in the settings.

Now my rating for this spell is 3/5. Hope this helps you.

Ty, will do when i come home..
Very helpfull that with the leak, and ive changed the effect since its, ugly..

Post the trigger here...

When i come home..!

@MortAr- - I think that i, you and even Shdow89 know that thats right, and will do like that. He just posted a bit fast. Everybody here is smart enought to do some simple maths.. -.-
 
Top