Hexing Blast v1.10

This bundle is marked as approved. It works and satisfies the submission rules.
  • Like
Reactions: Bununyx
Hexing Blast

Description: Throws a hexing blast to the target area, hexing all enemies caught in the cross-fire.

Level 1 - 2 Second Hex, 200 AOE.
Level 2 - 3 Second Hex, 250 AOE.
Level 3 - 4 Second Hex, 300 AOE.

MUI and uses DIR.

v1.00
-> Released.
v1.10
-> Removed invulnerability.
-> Dummy's Movement type set to none.
-> Initial trigger more efficient.
-> Deleted some unused variables.
-> Changed Dummy ability, works much more efficiently now.

  • Hexing Blast Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Hexing Blast
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_1 Equal to 0
        • Then - Actions
          • -------- If no instances are running, turn on loop. --------
          • Trigger - Turn on Hexing Blast Loop <gen>
        • Else - Actions
      • -------- Start Indexing --------
      • Set MUI_1 = (MUI_1 + 1)
      • -------- Dynamic Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI_1 Greater than Max_Index
        • Then - Actions
          • -------- Set Dynamic Indexes --------
          • Set MUI_2[MUI_1] = MUI_1
          • Set Max_Index = MUI_1
        • Else - Actions
      • -------- End Dynamic Indexing --------
      • -------- This makes it easier to read and looks cleaner --------
      • Set Temp = MUI_2[MUI_1]
      • -------- Save the caster in a variable --------
      • Set Caster[Temp] = (Triggering unit)
      • -------- The level of the ability. --------
      • Set Level[Temp] = (Level of Hexing Blast for Caster[Temp])
      • -------- ** Set the speed of the orb. --------
      • Set Speed[Temp] = 16.00
      • -------- ** Set the AoE of the spell (remember to change the ability's aoe as well) --------
      • Set AoE[Temp] = (150 + (50 x Level[Temp]))
      • -------- Set the locations which will be used for angles, dummy creation etc --------
      • Set Loc1 = (Position of Caster[Temp])
      • Set Loc4 = (Target point of ability being cast)
      • -------- The angle in which the dummy unit (orb) will move. --------
      • Set Angle[Temp] = (Angle from Loc1 to Loc4)
      • -------- These are the parabola variables. --------
      • Set Cur_D[Temp] = 0.00
      • Set Max_D[Temp] = (Distance between Loc1 and Loc4)
      • -------- ** Change the height here --------
      • Set Max_H[Temp] = (Random real number between 170.00 and 250.00)
      • -------- Creates the dummy unit --------
      • Unit - Create 1 Dummy for (Owner of Caster[Temp]) at Loc1 facing Default building facing degrees
      • -------- Save the dummy unit --------
      • Set Dummy[Temp] = (Last created unit)
      • -------- This is used for parabola. --------
      • Unit - Add Storm Crow Form to Dummy[Temp]
      • Unit - Remove Storm Crow Form from Dummy[Temp]
      • -------- The second dummy is used to determine when the orb has reached its destination. --------
      • Unit - Create 1 Dummy for (Owner of Caster[Temp]) at Loc4 facing Default building facing degrees
      • -------- Save the second dummy unit. --------
      • Set Dummy2[Temp] = (Last created unit)
      • -------- ** The eye-candy in the centre. --------
      • Special Effect - Create a special effect at Loc4 using Abilities\Spells\Undead\UndeadMine\UndeadMineCircle.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Removing the leaks. --------
      • Custom script: call RemoveLocation(udg_Loc1)
      • Custom script: call RemoveLocation(udg_Loc4)
  • Hexing Blast Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MUI_3) from 1 to MUI_1, do (Actions)
        • Loop - Actions
          • -------- Again, makes it easier and cleaner. --------
          • Set Temp = MUI_2[MUI_3]
          • -------- Positions used for movement. --------
          • Set Loc = (Position of Dummy[Temp])
          • Set Loc2 = (Position of Dummy2[Temp])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Loc and Loc2) Greater than or equal to 30.00
            • Then - Actions
              • -------- The location which the orb will move to. --------
              • Set Loc3 = (Loc offset by Speed[Temp] towards Angle[Temp] degrees)
              • -------- Moving the dummy. --------
              • Unit - Move Dummy[Temp] instantly to Loc3
              • -------- Parabola, increasing current distance. --------
              • Set Cur_D[Temp] = (Cur_D[Temp] + Speed[Temp])
              • -------- Easy parabola equation --------
              • Set Real[1] = Max_H[Temp]
              • Set Real[2] = Max_D[Temp]
              • Set Real[3] = Cur_D[Temp]
              • Custom script: set udg_Real[4] = (4 * udg_Real[1] / udg_Real[2]) * (udg_Real[2] - udg_Real[3]) * (udg_Real[3] / udg_Real[2])
              • -------- ** The orb effect. --------
              • Special Effect - Create a special effect attached to the origin of Dummy[Temp] using Abilities\Weapons\ProcMissile\ProcMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- Applying parabola. --------
              • Animation - Change Dummy[Temp] flying height to Real[4] at 0.00
              • -------- Removing Leak --------
              • Custom script: call RemoveLocation(udg_Loc3)
            • Else - Actions
              • -------- All the units getting their asses hexed --------
              • Set Group = (Units within (Real(AoE[Temp])) of Loc2 matching ((((Matching unit) belongs to an enemy of (Owner of Caster[Temp])) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is Mechanical) Equal to False))))
              • -------- Picking every unit. --------
              • Unit Group - Pick every unit in Group and do (Actions)
                • Loop - Actions
                  • -------- Create a dummy caster unit --------
                  • Unit - Create 1 Dummy for (Owner of Caster[Temp]) at Loc2 facing Default building facing degrees
                  • -------- Add dummy ability (Hex). --------
                  • Unit - Add Hexing Blast Dummy to (Last created unit)
                  • -------- Set level of ability --------
                  • Unit - Set level of Hexing Blast Dummy for (Last created unit) to Level[Temp]
                  • -------- So dummy wont live forever, causing lag. --------
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • -------- Ordering dummy to hex. --------
                  • Unit - Order (Last created unit) to Human Sorceress - Polymorph (Picked unit)
              • -------- Removing group leak. --------
              • Custom script: call DestroyGroup(udg_Group)
              • -------- ** Nice eye-candy that appears when orb is dead. --------
              • Special Effect - Create a special effect at Loc2 using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at Loc2 using Abilities\Spells\Other\HealingSpray\HealBottleMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- Removes the dummy units for the game. --------
              • Unit - Remove Dummy[Temp] from the game
              • Unit - Remove Dummy2[Temp] from the game
              • -------- Recycling Endexes --------
              • Set MUI_2[MUI_3] = MUI_2[MUI_1]
              • Set MUI_2[MUI_1] = Temp
              • Set MUI_1 = (MUI_1 - 1)
              • Set MUI_3 = (MUI_3 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MUI_1 Equal to 0
                • Then - Actions
                  • -------- If there are no instances running, turn off this trigger. --------
                  • Trigger - Turn off (This trigger)
                • Else - Actions
          • -------- Removing Leaks --------
          • Custom script: call RemoveLocation(udg_Loc)
          • Custom script: call RemoveLocation(udg_Loc2)
Keywords:
Polymorph, sheep, sway, circulate, rotate, circle, morph, transform, aoe, f0rsak3n, area, shadow, water, fire, light, holy, hex, voodoo, dark, slash.
Contents

Hexing Blast v1.00 (Map)

Reviews
06:49, 19th Jul 2011 Maker: Approved. I like the effects. To optimize a bit, get rid of Loc4 variable and use Custom script: set bj_wantDestroyGroup = true and not a variable for the unit group.

Moderator

M

Moderator

06:49, 19th Jul 2011
Maker:
Approved. I like the effects.
To optimize a bit, get rid of Loc4 variable and use Custom script: set bj_wantDestroyGroup = true and not a variable for the unit group.
 
Level 8
Joined
Apr 25, 2009
Messages
296
Set (Last Created Unit) and (Triggering Unit) to a variable and re-use the variable to make it more efficient. (Instead of constantly calling GetTriggerUnit())

Instead of using Set (variable) Group = Units in range.... Just use

  • Custom script: set bj_wantDestroyGroup = true
===============================================

  • Unit - Add Storm Crow Form to (Last created unit)
  • Unit - Remove Storm Crow Form from (Last created unit)
What's the point of instantly adding and then removing it? Why not just use the Object Editor flying check?
 
Level 14
Joined
Nov 2, 2008
Messages
579
Set (Last Created Unit) and (Triggering Unit) to a variable and re-use the variable to make it more efficient. (Instead of constantly calling GetTriggerUnit())
I haven't thought about it like that, Thanks.

Instead of using Set (variable) Group = Units in range.... Just use

  • Custom script: set bj_wantDestroyGroup = true
Forgive me if I'm wrong, but bj_wantDestroyGroup is to remove the group leak which I already do with call DestroyGroup. It has nothing to do with selecting units in range and canceling out who gets hexed.

  • Unit - Add Storm Crow Form to (Last created unit)
  • Unit - Remove Storm Crow Form from (Last created unit)
What's the point of instantly adding and then removing it? Why not just use the Object Editor flying check?
Can you elaborate please, I'm unfamiliar with it :>

I'm not sure the parabola is working perfectly. I think you could get better result by setting the dummy's movement type to none.

You don't need loc4 variable and remove invulnerability from the dummy.

Other than that, it looks okay.
I did what you said and it does seem more smooth. Thanks.
 
Level 8
Joined
Apr 25, 2009
Messages
296
Forgive me if I'm wrong, but bj_wantDestroyGroup is to remove the group leak which I already do with call DestroyGroup. It has nothing to do with selecting units in range and canceling out who gets hexed.

With bj_wantDestroyGroup its just more efficient and saves you a variable or two. Its preferred over setting it to a variable and destroying it.

Can you elaborate please, I'm unfamiliar with it :>

What's the point of adding Storm Crow Form and then instantly removing it? If it makes it 'fly' then why not change the dummy unit's movement type in the Object Editor to flying?
 
Level 14
Joined
Nov 2, 2008
Messages
579
With bj_wantDestroyGroup its just more efficient and saves you a variable or two. Its preferred over setting it to a variable and destroying it.
Ah I see, but i'm used to my method, and my spell is already so much more optimized and efficient than most spells in the section I'm sure it won't really matter.

What's the point of adding Storm Crow Form and then instantly removing it? If it makes it 'fly' then why not change the dummy unit's movement type in the Object Editor to flying?
Well according to maker it should be set to none. And all spells that use parabola that I've seen uses the storm crow ability.
 
f0rsAk3n said:
Ah I see, but i'm used to my method, and my spell is already so much more optimized and efficient than most spells in the section I'm sure it won't really matter.
-->I think it always matter to the mods...

Archangel678 said:
What's the point of adding Storm Crow Form and then instantly removing it? If it makes it 'fly' then why not change the dummy unit's movement type in the Object Editor to flying?
-->its better to use movement type of none and use SC ability... because setting it to fly will cause the dummy to "collide" sometimes with flying units even if you add locust (or at least, there will be a discrepancy with the target loc and the loc where the dummy will be created if there is another flying unit on that position)
 
Level 8
Joined
Apr 25, 2009
Messages
296
-->its better to use movement type of none and use SC ability... because setting it to fly will cause the dummy to "collide" sometimes with flying units even if you add locust (or at least, there will be a discrepancy with the target loc and the loc where the dummy will be created if there is another flying unit on that position)

Thanks for the clarification. I've never actually seen a two dummy units 'collide', nor seen a difference between adding crow form with a flying unit.
 
Top