• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Mega Flare V1.15

Thought I'd quickly make a new spell since I haven't made anything new in about a year (oh well)

Mega Flare:
I wanted to create something (like useual) which had a lot of appeal from special effects and the manipulation of them, as well as have an actual purpose in the game without being too strong, and hopefully this fulfills both of those ideals.

No SFX in this spell goes to waste - it /does/ all do things


- Heavily configurable
- Eye candy heaven
- 3D collision detection (Sfx detects when enemies are nearby on all axis to damage)
- Ignores Magic Immune targets/allies
- Enemies recognise Hero as damage source



  • Mega Flare Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Do not touch --------
      • Hashtable - Create a hashtable
      • Set FlareStarHash = (Last created hashtable)
      • -------- --------------------- --------
      • -------- Configurables --------
      • -------- How many sides there are to the star --------
      • Set StarSidesBase = 5
      • Set StarSidesPerLevel = 1
      • -------- How many sides there are to the star --------
      • Set StarSegmentAOEDamageBase = 10.00
      • Set StarSegmentAOEDamagePerlevel = 5.00
      • -------- Size of the star --------
      • Set StarSize = 400.00
      • -------- Revolution speed --------
      • Set SpinSpeed = 4.00
      • -------- Height increase speed --------
      • Set AscentSpeed = 15.00
      • -------- Maxmimum achieved height --------
      • Set AscentHeight = 700.00
      • -------- Star Expanding Speed --------
      • Set SpreadSpeed = 2.00
      • -------- Star Explosion Sides --------
      • Set ExplosionSidesBase = 4
      • Set ExplosionSidesPerLevel = 2
      • -------- Explosion Radius Base --------
      • Set ExplosionRadius = 200.00
      • -------- Star Explosion Layers --------
      • Set ExplosionLayersBase = 1
      • Set ExplosionLayersPerlevel = 1
      • -------- Explosion projectile max height multiplyer --------
      • Set ExplosionProjectileHeightMutli = 2.50
      • -------- Explosion projectile speed --------
      • Set ProjectileSpeed = 5.00
      • -------- --------------------- --------
  • Mega Flare
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Mega Flare
    • Actions
      • Trigger - Turn on Mega Flare Loop <gen>
      • Set u = (Triggering unit)
      • Custom script: set udg_X[1] = GetSpellTargetX()
      • Custom script: set udg_Y[1] = GetSpellTargetY()
      • Hashtable - Save 1 as 14 of (Key (Triggering unit)) in FlareStarHash
      • For each (Integer Star_Loop) from 1 to (StarSidesBase + ((Level of Mega Flare for (Triggering unit)) x StarSidesPerLevel)), do (Actions)
        • Loop - Actions
          • Set Angle = (Angle + (360.00 / ((Real(StarSidesBase)) + ((Real(StarSidesPerLevel)) x (Real((Level of Mega Flare for (Triggering unit))))))))
          • Custom script: set udg_X[2] = udg_X[1] + udg_StarSize * Cos(udg_Angle * bj_DEGTORAD)
          • Custom script: set udg_Y[2] = udg_Y[1] + udg_StarSize * Sin(udg_Angle * bj_DEGTORAD)
          • Set TempPoint = (Point(X[1], Y[1]))
          • Set TempPoint2 = (Point(X[2], Y[2]))
          • Unit - Create 1 Flare Section for (Owner of u) at TempPoint2 facing (Angle from TempPoint to TempPoint2) degrees
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Set UHandle = (Key (Last created unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 14 of (Key (Triggering unit)) from FlareStarHash) Equal to 1
            • Then - Actions
              • Hashtable - Save 1 as 14 of UHandle in FlareStarHash
              • Hashtable - Save 0 as 14 of (Key (Triggering unit)) in FlareStarHash
            • Else - Actions
          • Unit Group - Add (Last created unit) to FlareSegmentGroup
          • -------- Star Stage Indicator --------
          • Hashtable - Save 1 as 1 of UHandle in FlareStarHash
          • -------- Original Unit Indicator --------
          • Hashtable - Save Handle Ofu as 2 of UHandle in FlareStarHash
          • -------- CentralPointIndicators --------
          • Hashtable - Save X[1] as 3 of UHandle in FlareStarHash
          • Hashtable - Save Y[1] as 4 of UHandle in FlareStarHash
          • -------- CurrentAngleIndicator --------
          • Hashtable - Save Angle as 5 of UHandle in FlareStarHash
          • -------- CurrentSizeIndicator --------
          • Hashtable - Save StarSize as 8 of UHandle in FlareStarHash
          • -------- Explosion Layers --------
          • Hashtable - Save (ExplosionLayersBase + (ExplosionLayersPerlevel x (Level of Mega Flare for u))) as 9 of UHandle in FlareStarHash
          • Hashtable - Save (ExplosionSidesBase + (ExplosionSidesPerLevel x (Level of Mega Flare for u))) as 15 of UHandle in FlareStarHash
          • -------- --------------------- --------
  • Mega Flare Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FlareSegmentGroup and do (Actions)
        • Loop - Actions
          • Set UHandle = (Key (Picked unit))
          • -------- Star Stage 1 - Ascent --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 1 of UHandle from FlareStarHash) Equal to 1
            • Then - Actions
              • Hashtable - Save ((Load 5 of UHandle from FlareStarHash) + SpinSpeed) as 5 of UHandle in FlareStarHash
              • Hashtable - Save ((Load 8 of UHandle from FlareStarHash) + SpreadSpeed) as 8 of UHandle in FlareStarHash
              • Set Angle = (Load 5 of UHandle from FlareStarHash)
              • Set X[1] = (Load 3 of UHandle from FlareStarHash)
              • Set Y[1] = (Load 4 of UHandle from FlareStarHash)
              • Set Distance = (Load 8 of UHandle from FlareStarHash)
              • Custom script: call SetUnitX(GetEnumUnit(), udg_X[1] + udg_Distance * Cos(udg_Angle * bj_DEGTORAD))
              • Custom script: call SetUnitY(GetEnumUnit(), udg_Y[1] + udg_Distance * Sin(udg_Angle * bj_DEGTORAD))
              • Hashtable - Save ((Load 6 of UHandle from FlareStarHash) + AscentSpeed) as 6 of UHandle in FlareStarHash
              • Animation - Change (Picked unit) flying height to (Load 6 of UHandle from FlareStarHash) at 0.00
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 6 of UHandle from FlareStarHash) Greater than or equal to AscentHeight
                • Then - Actions
                  • Hashtable - Save 2 as 1 of UHandle in FlareStarHash
                • Else - Actions
            • Else - Actions
          • -------- Star Stage 2 - Decent --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 1 of UHandle from FlareStarHash) Equal to 2
            • Then - Actions
              • Hashtable - Save ((Load 5 of UHandle from FlareStarHash) + SpinSpeed) as 5 of UHandle in FlareStarHash
              • Hashtable - Save ((Load 8 of UHandle from FlareStarHash) - (SpreadSpeed x 10.00)) as 8 of UHandle in FlareStarHash
              • Set Angle = (Load 5 of UHandle from FlareStarHash)
              • Set X[1] = (Load 3 of UHandle from FlareStarHash)
              • Set Y[1] = (Load 4 of UHandle from FlareStarHash)
              • Set Distance = (Load 8 of UHandle from FlareStarHash)
              • Custom script: call SetUnitX(GetEnumUnit(), udg_X[1] + udg_Distance * Cos(udg_Angle * bj_DEGTORAD))
              • Custom script: call SetUnitY(GetEnumUnit(), udg_Y[1] + udg_Distance * Sin(udg_Angle * bj_DEGTORAD))
              • Hashtable - Save ((Load 6 of UHandle from FlareStarHash) - (AscentSpeed x 1.50)) as 6 of UHandle in FlareStarHash
              • Animation - Change (Picked unit) flying height to (Load 6 of UHandle from FlareStarHash) at 0.00
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 8 of UHandle from FlareStarHash) Less than 0.00
                • Then - Actions
                  • Unit - Kill (Picked unit)
                  • Unit Group - Remove (Picked unit) from FlareSegmentGroup
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load 14 of UHandle from FlareStarHash) Equal to 1
                    • Then - Actions
                      • Hashtable - Save 0 as 14 of UHandle in FlareStarHash
                      • For each (Integer Star_Loop) from 1 to (Load 15 of UHandle from FlareStarHash), do (Actions)
                        • Loop - Actions
                          • Set Angle = (Angle + (360.00 / (Real((Load 15 of UHandle from FlareStarHash)))))
                          • Set ExplosionRadiusCurrent = ExplosionRadius
                          • For each (Integer Star_Loop_2) from 1 to (Load 9 of UHandle from FlareStarHash), do (Actions)
                            • Loop - Actions
                              • Set TempPoint = (Point(X[1], Y[1]))
                              • Unit - Create 1 Flare Section for (Owner of (Picked unit)) at TempPoint facing Angle degrees
                              • Custom script: set udg_X[2] = udg_X[1] + udg_ExplosionRadiusCurrent * Cos(udg_Angle * bj_DEGTORAD)
                              • Custom script: set udg_Y[2] = udg_Y[1] + udg_ExplosionRadiusCurrent * Sin(udg_Angle * bj_DEGTORAD)
                              • Set TempPoint2 = (Point(X[2], Y[2]))
                              • Hashtable - Save (Distance between TempPoint and TempPoint2) as 10 of (Key (Last created unit)) in FlareStarHash
                              • Custom script: call RemoveLocation(udg_TempPoint2)
                              • Custom script: call RemoveLocation(udg_TempPoint)
                              • Hashtable - Save ((Load 10 of (Key (Last created unit)) from FlareStarHash) x ExplosionProjectileHeightMutli) as 11 of (Key (Last created unit)) in FlareStarHash
                              • Set ExplosionRadiusCurrent = (ExplosionRadiusCurrent + 100.00)
                              • Hashtable - Save 3 as 1 of (Key (Last created unit)) in FlareStarHash
                              • Hashtable - Save Handle Of(Load 2 of UHandle in FlareStarHash) as 2 of (Key (Last created unit)) in FlareStarHash
                              • Unit Group - Add (Last created unit) to FlareSegmentGroup
                    • Else - Actions
                • Else - Actions
            • Else - Actions
          • -------- Star Stage 3 - Explosion --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 1 of UHandle from FlareStarHash) Equal to 3
            • Then - Actions
              • Set u = (Picked unit)
              • Set Angle = (Facing of u)
              • Set Distance = ProjectileSpeed
              • Custom script: set udg_X[1] = GetUnitX(udg_u)
              • Custom script: set udg_Y[1] = GetUnitY(udg_u)
              • Custom script: call SetUnitX(udg_u, udg_X[1] + udg_Distance * Cos(udg_Angle * bj_DEGTORAD))
              • Custom script: call SetUnitY(udg_u, udg_Y[1] + udg_Distance * Sin(udg_Angle * bj_DEGTORAD))
              • Hashtable - Save ((Load 12 of UHandle from FlareStarHash) + Distance) as 12 of UHandle in FlareStarHash
              • Hashtable - Save (((4.00 x (Load 11 of UHandle from FlareStarHash)) / (Load 10 of UHandle from FlareStarHash)) x (((Load 12 of UHandle from FlareStarHash) / (Load 10 of UHandle from FlareStarHash)) x ((Load 10 of UHandle from FlareStarHash) - (Load 12 of UHandle from FlareSta as 13 of UHandle in FlareStarHash
              • Animation - Change u flying height to (Load 13 of UHandle from FlareStarHash) at 0.00
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 13 of UHandle from FlareStarHash) Less than 0.00
                • Then - Actions
                  • Unit - Kill (Picked unit)
                  • Custom script: set udg_X[1] = GetUnitX(udg_u)
                  • Custom script: set udg_Y[1] = GetUnitY(udg_u)
                  • Set TempPoint = (Point(X[1], Y[1]))
                  • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
                  • Custom script: call RemoveLocation(udg_TempPoint)
                  • Special Effect - Destroy (Last created special effect)
                  • Set TempPoint2 = (Position of (Picked unit))
                  • Set TempGroup = (Units within 100.00 of TempPoint2 matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Load 2 of UHandle in FlareStarHash))) Equal to True)) and ((((Matching unit) is Magic Immune) Equal to False) and
                  • Custom script: call RemoveLocation(udg_TempPoint2)
                  • Unit Group - Pick every unit in TempGroup and do (Actions)
                    • Loop - Actions
                      • Unit - Cause (Load 2 of UHandle in FlareStarHash) to damage (Picked unit), dealing ((StarSegmentAOEDamageBase x 5.00) + ((StarSegmentAOEDamagePerlevel x 5.00) x (Real((Level of Mega Flare for (Load 2 of UHandle in FlareStarHash)))))) damage of attack type Spells and damage type Normal
                  • Custom script: call DestroyGroup(udg_TempGroup)
                  • Unit Group - Remove (Picked unit) from FlareSegmentGroup
                  • If ((Number of units in FlareSegmentGroup) Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
                • Else - Actions
            • Else - Actions
          • Set TempPoint2 = (Position of (Picked unit))
          • Set TempGroup = (Units within 100.00 of TempPoint2 matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Load 2 of UHandle in FlareStarHash))) Equal to True)) and ((((Matching unit) is Magic Immune) Equal to False) and
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause (Load 2 of UHandle in FlareStarHash) to damage (Picked unit), dealing (StarSegmentAOEDamageBase + (StarSegmentAOEDamagePerlevel x (Real((Level of Mega Flare for (Load 2 of UHandle in FlareStarHash)))))) damage of attack type Spells and damage type Normal
          • Custom script: call DestroyGroup(udg_TempGroup)



-=V1.00=-
- Initial upload
- As useual: expecting many problems to iron out soon
-=V1.10=-
- Corrected Leaks
|- Horrible derp on that, fixed that now
- Changed setup to map init
-=V1.15=-
- Changed UHandle into an integer


Give Credits to me if you use this in your map.

Enjoy

Keywords:
Flare, Mega, Explosion, Star, Rain, Fire, Flame, Bomb, Nuke, Eyecandy.
Contents

Mega Flare (Map)

Reviews
16th Dec 2011 Bribe: Nice screenshot. The X/Y real arrays might be used for users for just temporary, non-array variables (I have a couple test maps like this for example). You could just make them normal variables named TempX/TempX2 for example...

Moderator

M

Moderator

16th Dec 2011
Bribe: Nice screenshot.

The X/Y real arrays might be used for users for just temporary, non-array variables (I have a couple test maps like this for example). You could just make them normal variables named TempX/TempX2 for example.

(Key (Last created unit)) you could do the same like you did with (Key UHandle) by setting it to a variable (a different variable of course).

Otherwise looks decent. I can't spot any errors. Approved 3/5.
 
Top