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!
" I'll let your eyes taste the special eye candy!!! "
[TD]
SPELL IMAGES:
[/TD]
onCast
onMid
onEnd
Lets begin with the main matter or orb. This orb will seek the targeted location
Each matter properties improves per level.
Level 1
Level 2
Level 3
After revolving for a short duration , each matter attracts to the main orb causing them to magnetized in a center and revolves at a very high speed.
Of course after they get closer to their main orb , it will mix them together and creates an explosion energy matter orbs that leads to a great FIREWORKS!
[TD]
CHANGELOGS
:[/TD][TD]
v1.0 - Released[/TD]
[TD]
CREDITS
:[/TD][TD] Bribe
( Unit Indexer System ) Jad
( KB3D System ) defskull
( LH System ) IcemanBo , Anitarf , Ammorth
( LSE System )
[/TD]
Unstable Matter Configuration
Unstable Matter Execution
Unstable Matter Loop
Unstable Matter Configuration
Events
Map initialization
Conditions
Actions
-------- --------
-------- * SPELL CONFIGURATION FIELD * --------
-------- --------
-------- OBJECT EDITOR ( F6 ) --------
-------- The spell or ability used in the triggers. ( Import the Unstable Matter Ability ) --------
Set UM_Ability = Unstable Matter
-------- The customized dummy unit used in the triggers. ( Import the Unstable Matter Dummy ) --------
Set UM_DummyType = Unstable Matter Dummy
-------- --------
-------- SPELL DATA --------
-------- --------
-------- - --------
-------- The maximum level of the spell or ability. --------
Set UM_AbilityMaxLevel = 3
-------- ^ Modify at your own risk: The value must be equal to the number of levels inside the Unstable Matter Ability, uncorrect values causes errors. --------
-------- - --------
-------- The radius or area of effect of the spell or ability. --------
Set UM_Radius[1] = 350.00
Set UM_Radius[2] = 375.00
Set UM_Radius[3] = 400.00
-------- - --------
-------- The radius or area of effect of the spell or ability when explodes. --------
Set UM_ExplosionRadius[1] = 700.00
Set UM_ExplosionRadius[2] = 750.00
Set UM_ExplosionRadius[3] = 800.00
-------- - --------
-------- Destroy Trees? ( Specifically on distribution of explosion orbs ) True = Yes, False = No --------
Set UM_DestroyTrees = True
-------- - --------
-------- The attack and damage type of the source of damage. ( Caster ) --------
Set UM_AttackType = Spells
Set UM_DamageType = Normal
-------- - --------
-------- The interval of the looping trigger. Recommended Value: 0.03125000 = 1 second / 32 Iterations/Frames --------
Set UM_LoopInterval = 0.02
-------- ^ I've modified it to 0.02 = 0.022222 = 1 second / 45 Iterations/Frames ( Smooth Visualizations! ) --------
-------- ^ Modify at your own risk: Changing this value affects the spell performance so modify wisely! --------
-------- - --------
-------- --------
-------- MAIN ORB DATA --------
-------- --------
-------- - --------
-------- The art model used to attach in the main orb. --------
Set UM_Effect[1] = Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
Set UM_EffectAttach[1] = origin
-------- - --------
-------- The size of the main orb. --------
Set UM_MainSize[1] = 3.25
Set UM_MainSize[2] = 3.75
Set UM_MainSize[3] = 4.25
-------- - --------
-------- The height of the main orb. --------
Set UM_MainHeight[1] = 55.00
Set UM_MainHeight[2] = 65.00
Set UM_MainHeight[3] = 75.00
-------- - --------
-------- The speed of the main orb. ( Distance Per Second ) --------
Set UM_MainSpeed[1] = 550.00
Set UM_MainSpeed[2] = 575.00
Set UM_MainSpeed[3] = 600.00
-------- - --------
-------- The spawn offset or creation range of the main orb away from the facing of the caster. --------
Set UM_MainCreationRange = 25.00
-------- - --------
-------- --------
-------- UNSTABLE MATTERS DATA --------
-------- --------
-------- ( !Modify Wisely! ) --------
-------- --------
-------- - --------
-------- The amount or number of the created matters. The maximum value is 75 ( Set the motion effect chance to 0 if you want this large value ) --------
Set UM_MatterAmount[1] = 3
Set UM_MatterAmount[2] = 6
Set UM_MatterAmount[3] = 12
-------- - --------
-------- The size of the matters. ( Sadly my matter models are not scale-able! ) ( Default: 1 ) --------
Set UM_MatterSize[1] = 1.00
Set UM_MatterSize[2] = 1.00
Set UM_MatterSize[3] = 1.00
-------- - --------
-------- The height of the matters. --------
Set UM_MatterHeight[1] = 45.00
Set UM_MatterHeight[2] = 55.00
Set UM_MatterHeight[3] = 65.00
-------- - --------
-------- Rotate Matters? True = Yes, False = No --------
Set UM_MatterRotation = True
-------- ^ IF: TRUE = You can modify the matter rotation angle speed. ( Positive Values = Counter Clockwise , Negative Values = Clockwise ) --------
Set UM_MatterRotationAngleSpeed[1] = 2.00
Set UM_MatterRotationAngleSpeed[2] = -2.00
Set UM_MatterRotationAngleSpeed[3] = 2.00
-------- - --------
-------- The duration of the unstable matter revolving around the main orb. --------
Set UM_RevolveDuration[1] = 6.00
Set UM_RevolveDuration[2] = 7.00
Set UM_RevolveDuration[3] = 8.00
-------- - --------
-------- The unstable matter art models used. ( Import the UnstableMatter.mdx models ) ( OPTIONAL ) --------
Set UM_Effect[2] = war3mapImported\UnstableMatterRed.mdx
Set UM_Effect[3] = war3mapImported\UnstableMatterBlue.mdx
Set UM_Effect[4] = war3mapImported\UnstableMatterYellow.mdx
Set UM_Effect[5] = war3mapImported\UnstableMatterViolet.mdx
Set UM_Effect[6] = war3mapImported\UnstableMatterGreen.mdx
Set UM_Effect[7] = war3mapImported\UnstableMatterOrange.mdx
-------- UM_Effect[ 2 , 7 ] = [ UM_MatterMinimumEffect , UM_MatterMaximumEffect ] is the RANGE of the GetRandomNumber. --------
-------- The minimum and maximum array effect that is used randomly by each matter. --------
Set UM_MatterMinimumEffect = 2
-------- ^ The first initial array effect variable: UM_Effect[ 2 ] = 2 is the array minimum number so this is the minimum effect will be chosen. --------
Set UM_MatterMaximumEffect = 7
-------- ^ The first last array effect variable: UM_Effect[ 7 ] = 7 is the array maximum number so this is the maximum effect will be chosen. --------
-------- ^ If you want to add another art model then you can set another variable UM_Effect[ 8 ] then put your desired art model path in it. ( YOU MUST ALSO SET THE UM_MatterMaximumEffect to 8 ) --------
-------- ^ The UM_MatterMaximumEffect must be lesser than or equal to 10 and cannot be 0 to prevent problems. ( You can only add 3 additional effects at this moment. ) --------
-------- ^ Modify at your own risk: uncorrect matter minimum and maximum effect integer value can cause attaching model error. --------
-------- This attachment point applies to all unstable matter units. --------
Set UM_EffectAttach[2] = origin
-------- - --------
-------- These are just the lightning effect model used in the spell. You can find some more lightning models inside the LHS ( defskull ) folder in LH Setup trigger. --------
-------- CLPB - CHAIN LIGHTNING PRIMARY --------
-------- DRAL - DRAIN LIFE --------
-------- DRAM - DRAIN MANA --------
-------- AFOD - FINGER OF DEATH --------
-------- HWPB - HEALING WAVE PRIMARY --------
-------- SPLK - SPIRIT LINK --------
-------- MFPB - MANA FLARE --------
-------- The lightning effect models used in the bond between the main orb and the matter. --------
-------- The width of the lightning where the enemy units will be damaged when touched. --------
Set UM_MatterLightningWidth[1] = 25.00
Set UM_MatterLightningWidth[2] = 25.00
Set UM_MatterLightningWidth[3] = 25.00
-------- - --------
-------- The damage of the lightning touched in the width by the enemy units. ( Damage Per Second ) --------
Set UM_MatterLightningDamage[1] = 25.00
Set UM_MatterLightningDamage[2] = 30.00
Set UM_MatterLightningDamage[3] = 35.00
-------- - --------
-------- The returning time of the matter to the main orb. --------
Set UM_MatterReturnTime[1] = 18.00
Set UM_MatterReturnTime[2] = 0.50
Set UM_MatterReturnTime[3] = 15.00
-------- - --------
-------- An effect occurs at the ground when the unstable matter moves or in motion state. --------
Set UM_Effect[11] = Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
-------- The percentage chance ( 0 , 100% ) to show the motion effect in looping intervals. --------
Set UM_MotionEffectChance = 5
-------- ^ If you want to disable the motion effect then you can set this value to 0. --------
-------- ^ Motions effects have a huge impact on spell performance especially when loop interval value is low. --------
-------- - --------
-------- An effect occurs at the unstable matters when they starts to return. --------
Set UM_Effect[12] = Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
-------- - --------
-------- Explodes When Matters Mixed Or Collided Each Other? True = Yes, False = No --------
Set UM_MatterCollideExplosion = True
-------- ^ IF: TRUE = Import the KB3D System ( Jad ) --------
-------- ^ IF: FALSE = Ignore and leave the KB3D System ( Jad ) and skip the explosion orbs section part. --------
-------- - --------
-------- --------
-------- EXPLOSION ORBS DATA --------
-------- --------
-------- The art models used in the explosion orbs is the same as the unstable matter art models above. --------
-------- ^ However I'll just give you the freedom to modify in this SPECIFIC explosion orbs art model if you don't like random. --------
Set UM_ExplosionOrbsModelSpecific = False
-------- ^ IF: TRUE = Modify the UM_Effect[ 13 ] art model path and it's attachment point. --------
Set UM_Effect[13] =
Set UM_EffectAttach[3] =
-------- - --------
-------- The amount or the number of the explosion orbs created. The maximum value that will not affect the spell performance is 50. --------
Set UM_ExplosionOrbsAmount[1] = 15
Set UM_ExplosionOrbsAmount[2] = 20
Set UM_ExplosionOrbsAmount[3] = 45
-------- - --------
-------- The size of the explosion orbs. --------
Set UM_ExplosionOrbsSize[1] = 1.00
Set UM_ExplosionOrbsSize[2] = 1.00
Set UM_ExplosionOrbsSize[3] = 1.00
-------- - --------
-------- The minimum and maximum height of the explosion orbs. --------
Set UM_ExplosionOrbsMinHeight[1] = 200.00
Set UM_ExplosionOrbsMinHeight[2] = 200.00
Set UM_ExplosionOrbsMinHeight[3] = 200.00
Set UM_ExplosionOrbsMaxHeight[1] = 400.00
Set UM_ExplosionOrbsMaxHeight[2] = 445.00
Set UM_ExplosionOrbsMaxHeight[3] = 475.00
-------- - --------
-------- The speed of the explosion orbs. ( Distance Per Second ) --------
Set UM_ExplosionOrbsSpeed[1] = 300.00
Set UM_ExplosionOrbsSpeed[2] = 325.00
Set UM_ExplosionOrbsSpeed[3] = 350.00
-------- - --------
-------- The collision radius of the explosion orbs when landed. --------
Set UM_ExplosionOrbsCollision[1] = 45.00
Set UM_ExplosionOrbsCollision[2] = 60.00
Set UM_ExplosionOrbsCollision[3] = 75.00
-------- - --------
-------- The damage inside the collision radius of the explosion orbs when landed. --------
Set UM_ExplosionOrbsDamage[1] = 75.00
Set UM_ExplosionOrbsDamage[2] = 100.00
Set UM_ExplosionOrbsDamage[3] = 125.00
-------- - --------
-------- An effect occurs at the ground when explosion orbs landed. --------
Set UM_Effect[14] = Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
-------- - --------
-------- The damage inside the explosion radius or area of effect to the enemy units. --------
Set UM_ExplosionRadiusDamage[1] = 100.00
Set UM_ExplosionRadiusDamage[2] = 150.00
Set UM_ExplosionRadiusDamage[3] = 200.00
-------- - --------
-------- An effect occurs at the main orb when explosion starts. ( Main Scaling ) --------
Set UM_Effect[15] = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
-------- - --------
-------- The percentage chance ( 0 , 100% ) to enable the explosion orbs to perform arc movements. --------
Set UM_ExplosionOrbsArcChance = 35
-------- ^ If you want to disable the arc motion then you can set this value to 0. --------
-------- ^ IF: Value > 0 = You can set the arc adjustments. --------
Set UM_ExplosionOrbsArc[1] = 25.00
Set UM_ExplosionOrbsArc[2] = 25.00
Set UM_ExplosionOrbsArc[3] = 25.00
-------- - --------
-------- This is the highest effect array variable number used. It's main purpose is for preloading so be careful if you modify this value. Only modify when you changed some array numbers in effects. --------
-------- UM_Effect[ 15 ] = is the highest so the array number is 15. --------
Custom script: function UM_InPlayableArea takes real x, real y returns boolean // Detects X/Y coordinates inside the playable area
Custom script: return x < udg_UM_Map[ 2 ] and x > udg_UM_Map[ 1 ] and y < udg_UM_Map[ 4 ] and y > udg_UM_Map[ 3 ]
Custom script: endfunction
Custom script:
Custom script: function UM_Move takes unit u, real motionX, real motionY, boolean b returns nothing // Moving a unit in the specific valid X/Y coordinates
Custom script: if UM_InPlayableArea( motionX, motionY ) then
Custom script: call SetUnitX( u, motionX )
Custom script: call SetUnitY( u, motionY )
Custom script: elseif b == false then
Custom script: call SetUnitX( u, motionX )
Custom script: call SetUnitY( u, motionY )
Custom script: endif
Unstable Matter Execution
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to UM_Ability
Actions
-------- --------
-------- OnCast --------
-------- --------
-------- declaration of locals: --------
Custom script: local real x
Custom script: local real y
Custom script: local real x2 = GetSpellTargetX( )
Custom script: local real y2 = GetSpellTargetY( )
Custom script: local real x3
Custom script: local real y3
Custom script: local real angle
-------- --------
-------- temporary index --------
Set UM_Caster[0] = (Triggering unit)
-------- --------
-------- spawn offset --------
Custom script: set x = GetUnitX( udg_UM_Caster[ 0 ] )
Custom script: set y = GetUnitY( udg_UM_Caster[ 0 ] )
Custom script: set angle = Atan2( y2 - y , x2 - x )
Custom script: set x3 = x + udg_UM_MainCreationRange * Cos( angle )
Custom script: set y3 = y + udg_UM_MainCreationRange * Sin( angle )
Custom script: set udg_UM_MaxDistance[ udg_UM_ID ] = SquareRoot( ( x2 - x ) * ( x2 - x ) + ( y2 - y ) * ( y2 - y ) ) - udg_UM_MainCreationRange
Custom script: set udg_UM_MainAngle[ udg_UM_ID ] = angle
-------- --------
-------- counters --------
Set UM_CurrentDistance[UM_ID] = 0.00
-------- --------
-------- phase one insert main element --------
Set UM_Phase[UM_ID] = 1
Unit Group - Add UM_Unit to UM_Group
-------- --------
-------- When these blocks become RED or malfunctions when you imported, just double click it ( the line ) and press enter to renew the function. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unstable Matter Loop <gen> is on) Equal to False
Then - Actions
Trigger - Turn on Unstable Matter Loop <gen>
Else - Actions
-------- --------
Unstable Matter Loop
Events
Conditions
Actions
-------- --------
-------- OnLoop --------
-------- --------
Unit Group - Pick every unit in UM_Group and do (Actions)
Loop - Actions
-------- --------
-------- declaration of locals: --------
Custom script: local real x
Custom script: local real y
Custom script: local real x2
Custom script: local real y2
Custom script: local real mX
Custom script: local real mY
Custom script: local real rX
Custom script: local real rY
Custom script: local real rX2
Custom script: local real rY2
Custom script: local integer i
-------- --------
Set UM_Unit = (Picked unit)
Custom script: set udg_UM_ID = GetUnitUserData( udg_UM_Unit )
-------- --------
-------- current element coordinates --------
Custom script: set x = GetUnitX( udg_UM_Unit )
Custom script: set y = GetUnitY( udg_UM_Unit )
-------- --------
-------- phase one moving main element --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UM_Phase[UM_ID] Equal to 1
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UM_CurrentDistance[UM_ID] Greater than or equal to UM_MaxDistance[UM_ID]
Then - Actions
-------- --------
-------- unstable matters creation --------
For each (Integer UM_CustomInteger) from 1 to UM_MatterAmount[UM_Level[UM_ID]], do (Actions)
Loop - Actions
-------- --------
-------- sub-elements --------
Set UM_MatterAngle[UM_ID] = (UM_MatterAngle[UM_ID] + UM_CustomReal2[UM_Level[UM_ID]])
Custom script: set x2 = x + udg_UM_Radius[ udg_UM_Level[ udg_UM_ID ] ] * Cos( udg_UM_MatterAngle[ udg_UM_ID ] * bj_DEGTORAD )
Custom script: set y2 = y + udg_UM_Radius[ udg_UM_Level[ udg_UM_ID ] ] * Sin( udg_UM_MatterAngle[ udg_UM_ID ] * bj_DEGTORAD )
Custom script: set udg_UM_CustomUnit = CreateUnit( udg_UM_CasterPlayer[ udg_UM_ID ] , udg_UM_DummyType , x2 , y2 , Atan2( y - y2 , x - x2 ) * bj_RADTODEG )
Custom script: set udg_UM_CustomID = GetUnitUserData( udg_UM_CustomUnit )
Custom script: set udg_UM_Main[ udg_UM_CustomID ] = udg_UM_Main[ udg_UM_ID ]
-------- --------
-------- allocations and properties --------
Set UM_Caster[UM_CustomID] = UM_Caster[UM_ID]
Set UM_CasterPlayer[UM_CustomID] = UM_CasterPlayer[UM_ID]
Set UM_Level[UM_CustomID] = UM_Level[UM_ID]
Set UM_MainModelHandler[UM_CustomID] = UM_MainModelHandler[UM_ID]
Set LSE_Width = UM_MatterLightningWidth[UM_Level[UM_ID]]
Trigger - Run LSE_Trigger_GetUnits (ignoring conditions)
-------- --------
-------- !NotDestroy! --------
Unit Group - Pick every unit in LSE_Group and do (Actions)
Loop - Actions
Set UM_PickedUnit = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(UM_PickedUnit is dead) Equal to False
(UM_PickedUnit is A structure) Equal to False
(UM_PickedUnit is Magic Immune) Equal to False
(UM_PickedUnit is A flying unit) Equal to False
(UM_PickedUnit belongs to an enemy of UM_CasterPlayer[UM_ID]) Equal to True
Then - Actions
Unit - Cause UM_Caster[UM_ID] to damage UM_PickedUnit, dealing UM_CustomReal6[UM_Level[UM_ID]] damage of attack type UM_AttackType and damage type UM_DamageType
Custom script: call GroupEnumUnitsInRange( bj_lastCreatedGroup , x , y , udg_UM_ExplosionRadius[ udg_UM_Level[ udg_UM_ID ] ] , null )
Custom script: loop
Custom script: set udg_UM_PickedUnit = FirstOfGroup( bj_lastCreatedGroup )
Custom script: exitwhen udg_UM_PickedUnit == null
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(UM_PickedUnit is dead) Equal to False
(UM_PickedUnit is A structure) Equal to False
(UM_PickedUnit is Magic Immune) Equal to False
(UM_PickedUnit is A flying unit) Equal to False
(UM_PickedUnit belongs to an enemy of UM_CasterPlayer[UM_ID]) Equal to True
Then - Actions
Unit - Cause UM_Caster[UM_ID] to damage UM_PickedUnit, dealing UM_ExplosionRadiusDamage[UM_Level[UM_ID]] damage of attack type UM_AttackType and damage type UM_DamageType
That's an insane amount of effects ._. So pretty to look at though. The spell concept itself is pretty bland, but the beautiful effects and the well organized code outweighs it. However, the overall spell duration is reeally long, I find it hard to...
That's an insane amount of effects ._. So pretty to look at though. The spell concept itself is pretty bland, but the beautiful effects and the well organized code outweighs it. However, the overall spell duration is reeally long, I find it hard to see its practicality in a WarCraft map. This can obviously be changed thanks to your config trigger though (anything faster would just make the spell look weird imo).
My only suggestion for you is to use an integer counter to decide when to turn on the loop instead of using the "Trigger - Trigger Is On" function.
About the duration the level 2 spell properties really fits into it ( but as you said it will make the spell weird xD )
About the integer counter, personally Im not convinced to use that as a checker inside the loop of unit groups ( I've had this problem before ) cause its actually doesnt turn off the loop trigger ( Ive also debug the integer counter but surprisingly it gave me odd results especially when casting a spell multiple times ) but Im not sure if Im just missing some things a long ago ^^.
Basically behaves like a unit group;
onCast:
If IntegerCounter == 0 then
Turn On Loop
endif
Add Unit in UnitGroup
Set IntegerCounter = IntegerCounter + 1
onLoop:
Remove Unit in UnitGroup
Set IntegerCounter = IntegerCounter - 1
If IntegerCounter == 0 then
Turn Off
endif
This is what I did on my hashtable spell before but when I actually debug Ive found out ( especially rapid cast ) that it actually doesnt turn off the loop thats why I prefer to use counting units on a unitgroup. ( yeah in terms of efficiency it is bad, but more safe )
Lol maybe I've messed up some things a long ago and thanks to you proving that.
Okay, now that EnumUnitsInGroup will be change to integer in my vocabulary
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.