Swirling death occurs at the target's coordinates. Explosions move towards the target in a circle until they reach it, then it will move outwards. Blue explosions deal physical damage, green explosions deal magical. The center of explosion deals greater damage. Lasts 6 seconds. Note: Can target friendly units, primary target doesn't take damage and the target is silenced.
Siwrling Death Configuration:
Swirling Death Config
Events
Map initialization
Conditions
Actions
-------- The ability itself. --------
Set Cnfg_SD_Ability = Swirling |cffff0000D|reath
-------- The speed of the explosion circle. --------
Set Cnfg_SD_TurnRate = 10.00
-------- The speed explosions move closer to the target, or away from the target. --------
Set Cnfg_SD_CloserDistance = 5.00
-------- Explosion starting range (from the caster). --------
Set Cnfg_SD_OffsetRealStart = 500.00
-------- Spell duration (configure it in object editor as well). --------
Set Cnfg_SD_Duration[1] = 6.00
Set Cnfg_SD_Duration[2] = 7.00
Set Cnfg_SD_Duration[3] = 8.00
-------- Magical damage explosion special effect. --------
Set Cnfg_SD_SE1 = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
-------- Physical damage explosion special effect. --------
Set Cnfg_SD_SE2 = Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
-------- If you want only 1 type of explosion, remove all the stuff from the Else block which is in the following If Then Else statement. --------
-------- If you want 1 type of explosion to happen at the same rate as if it would be with 2 types of explosions, remove anything that is associated with the variable SD_ExplBoolean. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SD_ExplBoolean[SD_TempIndex] Equal to False
Then - Actions
Set SD_TempGroup = (Units within Cnfg_SD_AoE1[SD_AbilityLevel[SD_TempIndex]] of SD_TempPoint)
Unit Group - Pick every unit in SD_TempGroup and do (Actions)
Loop - Actions
Set SD_PickedUnits = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SD_PickedUnits belongs to an enemy of SD_TempPlayer[SD_TempIndex]) Equal to True
SD_PickedUnits Not equal to SD_Target[SD_TempIndex]
Then - Actions
Unit - Cause SD_Caster[SD_TempIndex] to damage SD_PickedUnits, dealing Cnfg_SD_Damage1[SD_AbilityLevel[SD_TempIndex]] damage of attack type Cnfg_SD_AttackType1 and damage type Cnfg_SD_DamageType1
Else - Actions
Special Effect - Create a special effect at SD_TempPoint using Cnfg_SD_SE1
Special Effect - Destroy (Last created special effect)
Else - Actions
Set SD_TempGroup = (Units within Cnfg_SD_AoE2[SD_AbilityLevel[SD_TempIndex]] of SD_TempPoint)
Unit Group - Pick every unit in SD_TempGroup and do (Actions)
Loop - Actions
Set SD_PickedUnits = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SD_PickedUnits belongs to an enemy of SD_TempPlayer[SD_TempIndex]) Equal to True
SD_PickedUnits Not equal to SD_Target[SD_TempIndex]
Then - Actions
Unit - Cause SD_Caster[SD_TempIndex] to damage SD_PickedUnits, dealing Cnfg_SD_Damage2[SD_AbilityLevel[SD_TempIndex]] damage of attack type Cnfg_SD_AttackType2 and damage type Cnfg_SD_DamageType2
Else - Actions
Special Effect - Create a special effect at SD_TempPoint using Cnfg_SD_SE2
Special Effect - Destroy (Last created special effect)
Set SD_ExplBoolean[SD_TempIndex] = SD_ExplBoolean[SD_MaxIndex]
Set SD_Duration[SD_TempIndex] = SD_Duration[SD_MaxIndex]
Set SD_Degree[SD_TempIndex] = SD_Degree[SD_MaxIndex]
Set SD_StartOffsetReal[SD_TempIndex] = SD_StartOffsetReal[SD_MaxIndex]
Set SD_AbilityLevel[SD_TempIndex] = SD_AbilityLevel[SD_MaxIndex]
Set SD_Target[SD_TempIndex] = SD_Target[SD_MaxIndex]
Set SD_Target[SD_MaxIndex] = No unit
Set SD_Caster[SD_TempIndex] = SD_Caster[SD_MaxIndex]
Set SD_Caster[SD_MaxIndex] = No unit
Set SD_TempPlayer[SD_TempIndex] = SD_TempPlayer[SD_MaxIndex]
Set SD_MaxIndex = (SD_MaxIndex - 1)
Set SD_TempIndex = (SD_TempIndex - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SD_MaxIndex Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Primary spell is based on melee Soul Fire ability, to instantly silence the opponent, and give them a buff. The spell itself is pretty simple. The spell is written entirely by me and it's pretty easily configurable to different looking effects, different formations, speed etc. It's MUI.
Commend/Despise me in the comments below, looking forward to receiving feedback.
v1.1 - Added level support, fixed leaks, replaced random integer with a boolean array.
v1.2 - Fixed most things that the reviewers pointed out (thanks) couldn't do some stuff, so I just left it at that, may come back later.
v1.3 - Update mostly consists of the stuff that IcemanBo pointed out (thanks). Such as moving the other If Then Else block to the firsts Else statement, stopping the spell when the caster dies, deindexing ability level variable, making some import instructions and using the variable SD_PickedUnits when checking conditions whether to damage or not.
v1.4 - Minor update containing more detailed import instructions and nulling the spell when the target is dead.
v1.5 - Minor update containing a small damage flaw.
Feedback is always highly appreciated.
Keywords:
GUI, MUI, AoE, Swirly, 2nd spell in hive, simple.
Swirling Death v1.4 | Reviewed by BPower | 01.08.2015
Code[/COLOR]]
The spell is MUI, leakless and working.
There is a small mistake in your code ( See below )
I sure Damage2 should be Damage1.
Unit - Cause SD_Caster[SD_TempIndex] to...
Swirling Death v1.4 | Reviewed by BPower | 01.08.2015
[COLOR="gray"
[COLOR="gray"
[COLOR="gray"
[COLOR="gray"
Code[/COLOR]]
The spell is MUI, leakless and working.
There is a small mistake in your code ( See below )
I sure Damage2 should be Damage1.
Unit - Cause SD_Caster[SD_TempIndex] to damage SD_PickedUnits, dealing Cnfg_SD_Damage2[SD_AbilityLevel[SD_TempIndex]] damage of attack type Cnfg_SD_AttackType1 and damage type Cnfg_SD_DamageType1
Objects[/COLOR]]
Objects are ok. Nothing to complain here.
Effects[/COLOR]]
Effects are ok, however you spam them quite a lot.
@Map makers: Always be aware that effect spamming could be a reason for
unwanted fps drops, especially in multiplayer seasons. Be careful!
You only have to create one more integer[array] variable to support levels.
Then you have to change from some non-array variables to array variables. For Damage, AOE, Duration...
Init will look like this:
Set Damage[1] = 10
Set Damage[2] = 20
Set Damage[3] = 30
(user can change it for each level)
When you index you save the level of ability in your new variable:
Set AbilityLevel[index] = Level of (YourAbiliry for (YourUnit))
And in loop, when you do damage, you use it:
Unit - Cause Damage[AbilityLevel[index]] to unit.
Okay thanks, I'll try. Today I'm pretty beat, so I will put this on hold for a day. Tomorrow, I will finish it. Besides the leak and the missing level support, do you see any leaks?
But try to make as much configurable as posible. (attack- and damage type for example)
Instead of rolling a random number between 1 and 2, better use a boolean[array] which you always change between true/false.
You also don't need two temp group and no two temp unit variables.
You only have to create one more integer[array] variable to support levels.
Then you have to change from some non-array variables to array variables. For Damage, AOE, Duration...
Init will look like this:
Set Damage[1] = 10
Set Damage[2] = 20
Set Damage[3] = 30
(user can change it for each level)
When you index you save the level of ability in your new variable:
Set AbilityLevel[index] = Level of (YourAbiliry for (YourUnit))
And in loop, when you do damage, you use it:
Unit - Cause Damage[AbilityLevel[index]] to unit.
@Iceman
As I said, I don't quite know how to implement level support. Could you make a simple trigger spell that does, and post it in a reply? Because I tried your method, and I can't seem to get it right. If not, I guess I'll just fix leaks and stuff, and save level implemention for my next spell upload.
I tried to explain it. You can have a look in other GUI spells, which support it. If you sill don't understand it you can open a thread about your problem.
Unit Group - Pick every unit in SD_TempGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) belongs to an enemy of SD_TempPlayer[SD_TempIndex]) Equal to True
(Picked unit) Not equal to SD_Target[SD_TempIndex]
Then - Actions
Set SD_PickedUnits = (Picked unit)
Unit - Cause SD_Caster[SD_TempIndex] to damage SD_PickedUnits, dealing Cnfg_SD_Damage2[SD_AbilityLevel[SD_TempIndex]] damage of attack type Cnfg_SD_AttackType1 and damage type Normal
Unit Group - Pick every unit in SD_TempGroup and do (Actions)
Loop - Actions
Set SD_PickedUnits = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((SD_PickedUnits) belongs to an enemy of SD_TempPlayer[SD_TempIndex]) Equal to True
(SD_PickedUnits) Not equal to SD_Target[SD_TempIndex]
Then - Actions
Unit - Cause SD_Caster[SD_TempIndex] to damage SD_PickedUnits, dealing Cnfg_SD_Damage2[SD_AbilityLevel[SD_TempIndex]] damage of attack type Cnfg_SD_AttackType1 and damage type Normal
Swirling Death v1.1 - Review by IcemanBo & edo494
Date: November 6th, 2014
Concept:
Swirling Death silences the target, surrounds it with a circular movement, until it reaches it's position, and creates explosions all over it's way.
Afterwards it vanishs the same way back, in a circular/surrounding movement.
In terms of the surrounding circulation, inwards and outwards, and the different explosions on it's way (physical- and magical damage explosions),
it is a good and interesting spell concept.
Code:
In cast trigger:
Set SD_AbilityLevel[SD_MaxIndex] = (Level of Swirling Death for (Triggering unit))
->
Set SD_AbilityLevel[SD_MaxIndex] = (Level of Swirling Death for (SD_Caster[SD_MaxIndex]))
I personaly think it's better to try to stick in one way of coding. For example, in GUI, to use as less custom scripts as possible.
It's not that important, but you can remove this custom script line:
Custom script: set udg_SD_ExplBoolean[udg_SD_TempIndex] = not udg_SD_ExplBoolean[udg_SD_TempIndex]
^And instead, you just could set it to true/false in the matching If/Then/Else block via normal GUI action.
Immediatly store "PickedUnit" into the variable, so you already can use it for the checks in conditions.
Damage type should be configurable.
There is comment in loop:
"^And instead, you just could set it to true/false in the matching If/Then/Else block via normal GUI action."
That's corrent. But you should mention one thing. If user removes the boolean variable, there won't be a switching anymore between these two group enumerations and no witching between physical/magical damage. It follows that only one kind of enumeration and damaging will be executed, and so it will be executed twice as often as before. (-> double phiscal, or double magical damage will be dealt)
Second unit enumeration can be moved in "Else - Actions" part of first If/Then/Else, to avoid a second check for the boolean value.
In deindex part you have forgotten to switch the boolean variable with MaxIndex.
Set SD_PickedUnits = No Unit
^Nulling this global unit variable is not really needed, as you for sure will use it again.
Variable name "SD_StartOffsetLoc[]" could make someone think it's a location, but not a real.
Coding is alright. Aside of these minor mentioned things, it's fine.
Visuals:
Icon for learning and spell icon itself differs. This doesn't really make sense. You should equal them.
Learning tooltip does not privide any spell describing information. You should improve it.
Explosions look good, and it's movement is fairly smooth.
Spell tooltip. You don't have to describe technical aspects in detail:
For example, you don't have to note that you also can target allies. (it's set in object data anyways)
"Occurs at target's cooridinates" is also obviously, if you target a unit with a spell.
Also, you could highlight the name of the ability, as well as the hotkey.
Conclusion:
Swirling death has some nice special effects, that are fitting to the explosions. Also the circular movement towards the target looks good in game.
You definitly should work on spell's tooltip, even it doesn't seem really important.
In coding there is nothing expensive/impressing. It's a simple spell, but useful.
Deindex if the caster gets removed from game. The spell won't make any effect anymore, because caster can't damage anymore.
You can check if a unit is removed if one's UnitType equals "NoUnitType".
You forgot about "AbilityLevel[]" in your deindex part.
Refer to the variable instead of using "Picked Unit" more often.
No need to check the boolean[index] for true and for false in loop. You can move the whole physical damage block into the 'Else' of the first 'If - statement'.
Make some decent import instructions.
You're on a good way, but I still await an update for approval.
When target is dead/removed you should deindex. It might be tolerated for target's death, but it's not acceptable for unit being removed.
Better just cover both cases, and don't bother with these details no more. Just handle it as you do alredy for caster.
The speed in config doesn't match the actual wc3 movement speed. It's /0.03 in your case. Might be noted.
In import instructions:
4. Copy the variables if possible. If not, make them via Variable Editor.
^You should explain the usual method to use when copying triggers. It's just best for GUI.
Just for future. Try to keep variable names simple and intuitive. For example:
Set Cnfg_SD_CloserDistance = 5.00
User can't really imagine immediatly what you mean with this name, it could be simple "SD_Offset", or "SD_Speed".
And in config the additional "Cnfg_" is not necessarily needed. Here atleast you still have the "SD_" one included, so it's okay, but you also can remove the "Cnfg_" actually.
Hope you see what I mean. When reading a lot of code you start to get nitpicking when it comes to things like readability and good names.
Right now you do:
if boolean == false then
unit group stuff
else
slightly difference unit group stuff
However you can do:
Unitgroup
if boolean == false
actions
This will make the code a little shorter since you only need to store the unit group variable at one location in the code. However it will be more inefficient since you check for the boolean once per unit.
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.