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!
So, here we are... My first ever spell on Hive. I have been using Hive for a long time, so I thought I'd just try !
Originally made it for a RPG map which I work on (nothing too fancy), but I found it cool and wanted to share / improve it.
Spelling corrections are more than welcome. :}
Blessed Ring
Magically blesses an area with a seal of light. Ally units in this area will be healed while enemy units will be damaged every second.
Lasts 12 seconds.
Level 1 - Heals for 15 and damages for 20 hit points. Level 2 - Heals for 30 and damages for 40 hit points. Level 3 - Heals for 45 and damages for 60 hit points.
BlessedRingConfig
Events
Map initialization
Conditions
Actions
Set BR_Ability = Blessed Ring
Set BR_DummyUnitType = Dummy
-------- Set the Base and Increment per Level damage --------
Set BR_DamageBase = 20.00
Set BR_DamageIncrease = 20.00
-------- Set the Base and Increment per Level heal --------
Set BR_HealBase = 15.00
Set BR_HealIncrease = 15.00
-------- Set the Base and Increment per Level duration --------
Set BR_DurationBase = 12.00
Set BR_DurationIncrease = 0.00
-------- How many "Holy bolt" special effects you want on the outter ring --------
-------- Up to how many "Ressurection" special effects you want ? (will be random between 1 and Max) --------
-------- /!\ warning : too high numbers may cause lag /!\ --------
-------- /!\ warning #2 : Never set this to 0 or it might crash the game /!\ --------
Set BR_HolyBoltsNumber = 20
Set BR_RessurectionNumber = 3
BlessedRingInit
Events
Unit - A unit starts the effect of an ability
Conditions
(Ability being cast) is BR_Ability
Actions
-------- Making it MUI --------
Set BR_MaxIndex = (BR_MaxIndex + 1)
Set BR[BR_MaxIndex] = TRUE
-------- Store all the variables that will be needed : --------
Set BR_Loop[BR_MaxIndex] = 0
Set BR_CastingPoint[BR_MaxIndex] = (Target point of ability being cast)
Set BR_Caster[BR_MaxIndex] = (Casting unit)
Set BR_Level[BR_MaxIndex] = (Level of BR_Ability for BR_Caster[BR_MaxIndex])
Set BR_Increment[BR_MaxIndex] = ((Real(BR_Level[BR_MaxIndex])) - 1.00)
Set BR_Damage[BR_MaxIndex] = (BR_DamageBase + (BR_DamageIncrease x BR_Increment[BR_MaxIndex]))
Set BR_Heal[BR_MaxIndex] = (BR_HealBase + (BR_HealIncrease x BR_Increment[BR_MaxIndex]))
Set BR_Duration[BR_MaxIndex] = (BR_DurationBase + (BR_DurationIncrease x BR_Increment[BR_MaxIndex]))
Set BR_Player[BR_MaxIndex] = (Owner of BR_Caster[BR_MaxIndex])
-------- Create the dummy, store it, add exp. timer --------
Unit - Create 1 BR_DummyUnitType for BR_Player[BR_MaxIndex] at BR_CastingPoint[BR_MaxIndex] facing Orientation 0 degrees
Set BR_Dummy[(BR_MaxIndex x 7)] = (Last created unit)
Unit - Add a BR_Duration[BR_MaxIndex] second generic expiration timer to BR_Dummy[(BR_MaxIndex x 7)]
-------- Make it invisible --------
Animation - Change BR_Dummy[(BR_MaxIndex x 7)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
-------- Add 6 more dummys for SFX' sake --------
For each (Integer TempInteger) from 1 to 6, do (Actions)
Boucle - Actions
Set TempPoint = (BR_CastingPoint[BR_MaxIndex] offset by 200.00 towards (60.00 x (Real(TempInteger))) degrees)
Unit - Create 1 BR_DummyUnitType for Neutre Passif at TempPoint facing Orientation 0 degrees
Set BR_Dummy[((BR_MaxIndex x 7) + TempInteger)] = (Last created unit)
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
Blessed Ring_v1.3.1 | Reviewed by Maker | 14th Sep 2013
NEEDS FIX
The spell is leakless and MUI. The effects look good but there are
a lot of them. You make variables to...
dont use integer A/B. They are slower and less efficient than a custom integer
make ur own integer and use that
this is not MUI. all spells must be MUI. there is a chapter in my tutorial called how to index. The tutorial is things a GUIer should know. That will show u how to use indexed arrays which make things MUI.
u leak points. U should look at the tutorial things that leak.
This actually leaks twice. once for position of and once for the offset
Special Effect - Create a special effect at ((Position of BR_Dummy[(Integer A)]) offset by 400.00 towards (20.00 x (Real((Integer B)))) degrees) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
@DIMF : Thank you for your reply, I am now currently working on improving it.
I have a question, though. If I use the same integer in 2 loops in separate triggers that run at the same time, is there a chance that they will overwrite/override or something ?
@Losam : Name the spell ? Name the download ? Post the triggers ? I thought I did all of that...
anything u use twice or more should be stored into a variable and the variable should be used. Example: store picked unit in a tempUnit variable and use the tempUnit variable instead of picked unit.
y r u doing this ? Set BR_MaxIndex = (BR_MaxIndex + 7)
it should only be increased by 1
this should also be stored into a variable.
((Real(BR_Level[BR_MaxIndex])) - 1.00))
Set BR_HealedUnits[BR_TempInteger] = (Units within 400.00 of BR_CastingPoint[BR_TempInteger] matching ((((Picked unit) belongs to an ally of (Owner of BR_Caster[BR_TempInteger])) Egal Ã* TRUE) and (((Picked unit) is Un bâtiment) Egal Ã* FALSE)))
Set BR_DamagedUnits[BR_TempInteger] = (Units within 400.00 of BR_CastingPoint[BR_TempInteger] matching ((((Picked unit) belongs to an enemy of (Owner of BR_Caster[BR_TempInteger])) Egal Ã* TRUE) and (((Picked unit) is Un bâtiment) Egal Ã* FALSE)))
Its also better if u use one tempUnitGroup and add all units in 400 range of caster to it then use an ITE to sort out the actions.
This leaks (BR_CastingPoint[BR_MaxIndex] offset by (Random real number between 50.00 and 350.00) same with anything that u offset.
-------- Set the Base and Increment per Level damage --------
Set BR_DamageBase = 20.00
Set BR_DamageIncrease = 20.00
-------- Set the Base and Increment per Level heal --------
Set BR_HealBase = 15.00
Set BR_HealIncrease = 15.00
-------- Set the Base and Increment per Level duration --------
Set BR_DurationBase = 12.00
Set BR_DurationIncrease = 0.00
BlessedRingInit
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Blessed Ring
Actions
-------- Making it MUI --------
Set BR_MaxIndex = (BR_MaxIndex + 7)
Set BR[BR_MaxIndex] = True
-------- Store all the variables that will be needed : --------
Set BR_Loop[BR_MaxIndex] = 0
Set BR_CastingPoint[BR_MaxIndex] = (Target point of ability being cast)
Set BR_Caster[BR_MaxIndex] = (Casting unit)
Set BR_Level[BR_MaxIndex] = (Level of Blessed Ring for BR_Caster[BR_MaxIndex])
Set BR_Damage[BR_MaxIndex] = (BR_DamageBase + (BR_DamageIncrease x ((Real(BR_Level[BR_MaxIndex])) - 1.00)))
Set BR_Heal[BR_MaxIndex] = (BR_HealBase + (BR_HealIncrease x ((Real(BR_Level[BR_MaxIndex])) - 1.00)))
Set BR_Duration[BR_MaxIndex] = (BR_DurationBase + (BR_DurationIncrease x ((Real(BR_Level[BR_MaxIndex])) - 1.00)))
-------- Create the dummy, store it, add exp. timer --------
Unit - Create 1 Dummy for (Owner of BR_Caster[BR_MaxIndex]) at BR_CastingPoint[BR_MaxIndex] facing Default building facing degrees
Set BR_Dummy[BR_MaxIndex] = (Last created unit)
Unit - Add a BR_Duration[BR_MaxIndex] second Generic expiration timer to BR_Dummy[BR_MaxIndex]
-------- Make it invisible --------
Animation - Change BR_Dummy[BR_MaxIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
-------- Add 6 more dummys for SFX' sake --------
For each (Integer BR_TempInteger) from 1 to 6, do (Actions)
Loop - Actions
Unit - Create 1 Dummy for Neutral Passive at (BR_CastingPoint[BR_MaxIndex] offset by 200.00 towards (60.00 x (Real(BR_TempInteger))) degrees) facing Default building facing degrees
Set BR_Dummy[(BR_MaxIndex + BR_TempInteger)] = (Last created unit)
Unit - Add a BR_Duration[BR_MaxIndex] second Generic expiration timer to BR_Dummy[(BR_MaxIndex + BR_TempInteger)]
Animation - Change BR_Dummy[(BR_MaxIndex + BR_TempInteger)]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
Special Effect - Create a special effect at BR_CastingPoint[BR_MaxIndex] using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
Special Effect - Destroy (Last created special effect)
-------- Start the loops the firs time the spell is used --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BR_MaxIndex Not equal to 0
Then - Actions
Trigger - Turn on BlessedRingLoop2 <gen>
Trigger - Turn on BlessedRingLoop <gen>
Else - Actions
BlessedRingLoop
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
For each (Integer BR_TempInteger) from 1 to BR_MaxIndex, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BR[BR_TempInteger] Equal to True
Then - Actions
Set BR_Loop[BR_TempInteger] = (BR_Loop[BR_TempInteger] + 1)
-------- Heal and Damage --------
Set BR_HealedUnits[BR_TempInteger] = (Units within 400.00 of BR_CastingPoint[BR_TempInteger] matching ((((Picked unit) belongs to an ally of (Owner of BR_Caster[BR_TempInteger])) Equal to True) and (((Picked unit) is A structure) Equal to False)))
Set BR_DamagedUnits[BR_TempInteger] = (Units within 400.00 of BR_CastingPoint[BR_TempInteger] matching ((((Picked unit) belongs to an enemy of (Owner of BR_Caster[BR_TempInteger])) Equal to True) and (((Picked unit) is A structure) Equal to False)))
Unit Group - Pick every unit in BR_HealedUnits[BR_TempInteger] and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + BR_Heal[BR_TempInteger])
Unit Group - Pick every unit in BR_DamagedUnits[BR_TempInteger] and do (Actions)
Loop - Actions
Unit - Cause BR_Caster[BR_TempInteger] to damage (Picked unit), dealing BR_Damage[BR_TempInteger] damage of attack type Spells and damage type Normal
For each (Integer BR_TempInteger2) from 1 to 18, do (Actions)
Loop - Actions
Special Effect - Create a special effect at (BR_CastingPoint[BR_TempInteger] offset by 400.00 towards (20.00 x (Real(BR_TempInteger2))) degrees) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Real(BR_Loop[BR_TempInteger])) Greater than or equal to BR_Duration[BR_TempInteger]
For each (Integer BR_TempInteger) from 1 to BR_MaxIndex, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BR[BR_TempInteger] Equal to True
Then - Actions
For each (Integer BR_TempInteger2) from 1 to (Random integer number between 1 and 3), do (Actions)
Loop - Actions
Special Effect - Create a special effect at (BR_CastingPoint[BR_MaxIndex] offset by (Random real number between 50.00 and 350.00) towards (Random angle) degrees) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
Special Effect - Destroy (Last created special effect)
For each (Integer BR_TempInteger2) from 0 to 6, do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the overhead of BR_Dummy[(BR_TempInteger + BR_TempInteger2)] using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCasterOverhead.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
I will do a quick review of this spell.
General
Good description and screenshot.
Pros
Test map is extensive and has a nice terrain layout. However, since the test map only serves as the background to demonstrate a spell's functionality, you don't need to invest too much into it.
Spell has good effects. Quite eye-candy.
Configuration is available.
Importing instructions are available.
The dummy has the correct death type and settings. Don't add a sight range though. We believe users can do that themselves.
Cons
The spell currently doesn't support more than one level.
We recommend that you use "A unit Starts the effect of an ability" rather than "A unit Begins casting an ability". With sufficient speed, a player can cancel the cast order to render the mana cost void but still cause the triggers to execute. Thus it is a case of cheating and should be prevented.
To solve your usage of 7 dummies issue, you can try using Timed Effect by Almia, which supports creating a timed effect in a 3d plane.
Instead of having to make the dummies invisible, consider using dummy.mdx as it is a special model that is invisible by default but allow you to attach effects to it.
You never de-index the spell. The loop triggers are never turned off. Consider taking a look at this tutorial.
Lines like this
Special Effect - Create a special effect at (BR_CastingPoint[BR_TempInteger] offset by 400.00 towards (20.00 x (Real(BR_TempInteger2))) degrees) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
leaks. Consider using a TempPoint variable to fix the issue.
anything u use twice or more should be stored into a variable and the variable should be used. Example: store picked unit in a tempUnit variable and use the tempUnit variable instead of picked unit.
y r u doing this ? Set BR_MaxIndex = (BR_MaxIndex + 7)
it should only be increased by 1
this should also be stored into a variable.
((Real(BR_Level[BR_MaxIndex])) - 1.00))
Set BR_HealedUnits[BR_TempInteger] = (Units within 400.00 of BR_CastingPoint[BR_TempInteger] matching ((((Picked unit) belongs to an ally of (Owner of BR_Caster[BR_TempInteger])) Egal Ã* TRUE) and (((Picked unit) is Un bâtiment) Egal Ã* FALSE)))
Set BR_DamagedUnits[BR_TempInteger] = (Units within 400.00 of BR_CastingPoint[BR_TempInteger] matching ((((Picked unit) belongs to an enemy of (Owner of BR_Caster[BR_TempInteger])) Egal Ã* TRUE) and (((Picked unit) is Un bâtiment) Egal Ã* FALSE)))
Its also better if u use one tempUnitGroup and add all units in 400 range of caster to it then use an ITE to sort out the actions.
The number of effects created should be configurable. Here we believe that the greater range the users can modify a spell, the better it is. It is your call though.
You can merge the two loops. If you insist on using a different loop inverval for each phase, take a look at this tutorial which will explain how you can use a time counter. Using this same principle, you will execute the respective code based on the time counter variable in the same trigger.
[Update !] v1.2
About special effects on the Z axis, I'll probably look that up later because I'm a bit new to Jass and stuff
I'm adding 7 to the MaxIndex because I have 7 dummies each time, I store them in MaxIndex, MaxIndex +1, MaxIndex +2,...
Also, could you clarify this point please : "You never de-index the spell." :]
I didn't use dummy.mdx because it does not seem to an "overhead" attachement point, or I have trouble with it anyway... (Plus I kinda like the Particle effect from the Healing ward)
u should make 7 unit arrays then to hold the dummies. u shouldnt do it like that because when u de-index the indexed values get moved around.
look at my tutorial things a guier should know. look at the chapter how to index.
the spell i show u says de-index in the part that reduces the indexes and keeps the spell working.
I guess I'll have to use 2d arrays for the dummies then ? (Dummy[CurrentIndex][ActualDummy1-7])
(it's fine, I know how to deal with them even in the WE)
Yeah but If I want the spell to be MUI, I need to be able to have several 7 Dummys at the same time, that is why I am using a 2D array, and it's working very well.
v1.3 up !
Fixed a few bugs (involving decreasing the MaxIndex).
Didn't use 7 unit arrays because that would make the Loop in the Init trigger a lot more complicated.
Edit : For soem reason, this isn't showing to the first page even if I update it, if anyone reads this could you tell me if you know why please?
I'm not sure using Triggering player would work since it is the first time a player-related command appears in the trigger, the trigger would probably not be able to tell which player you're specifying. Plus would these changes make the spell/triggering any better ?
+ Spotted a misstake will reading the triggers to find (Owner of(Unit)), so thanks I guess
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.