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!
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)
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
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)
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.
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.
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)
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.
@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.. -.-
Please replace the usage of CustomValues via a hashtable, it is a clean and easy solution for attaching values to units since some spells/systems can interfere with custom value usage.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.