• 🏆 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!

[MUI] Explosion v.1.01

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: baassee
Thank's to Hive's tutorial's, I have learned a few things about MUI.
Sadly, I failed my first Attempt.
But it is fixed by a friend of mine which I really thanked alot.
I hope you guy's will like this!

Trigger Code:
Explosion Settings:
  • Explosion Settings
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Explosion
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Explosion Loop <gen>
        • Else - Actions
      • Set Index[1] = (Index[1] + 1)
      • Set Index[2] = (Index[2] + 1)
      • -------- No need to Change --------
      • -------- Your Casting Unit --------
      • Set ExplosionCaster[Index[2]] = (Triggering unit)
      • -------- Your Target Point --------
      • Set ExplosionTempPoint[Index[2]] = (Target point of ability being cast)
      • -------- No need to Change --------
      • -------- Setting the Random Area --------
      • -------- We will define the Where the Explosion Occurs --------
      • Set Min_Rad[Index[2]] = 0.00
      • Set Max_Rad[Index[2]] = 350.00
      • Set ExplosionRadius[Index[2]] = (80.00 + (20.00 + (Real((Level of Explosion for (Triggering unit))))))
      • -------- Change the Damage Here: --------
      • Set ExplosionDamage[Index[2]] = (50.00 + (30.00 x (Real((Level of Explosion for (Triggering unit))))))
      • -------- Change the spell duration in here --------
      • Set ExplosionDuration[Index[2]] = (5.00 + (1.00 x (Real((Level of Explosion for (Triggering unit))))))
      • -------- Change the Damage Interval in here --------
      • Set ExplosionDamageInterval[Index[2]] = (1.25 - (0.25 x (Real((Level of Explosion for (Triggering unit))))))
      • -------- Be sure to make them the seem for they will not work --------
      • Set ExplosionDamageInterval_2[Index[2]] = (1.25 - (0.25 x (Real((Level of Explosion for (Triggering unit))))))
      • -------- Change the Effect Here --------
      • Set ExplosionSFX = Abilities\Spells\Other\Doom\DoomDeath.mdl
      • -------- Checking Intervals --------
Explosion Loop:
  • Explosion Loop
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Index[3]) from 1 to Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ExplosionCaster[Index[3]] Not equal to No unit
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ExplosionDuration[Index[3]] Greater than 0.00
                • Then - Actions
                  • Set ExplosionDuration[Index[3]] = (ExplosionDuration[Index[3]] - 0.25)
                  • -------- we decrease the spell duration by 0.25 --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ExplosionDamageInterval_2[Index[3]] Less than or equal to 0.00
                    • Then - Actions
                      • -------- Setting the variables --------
                      • Set ExplosionAreaRandom[Index[3]] = (Random real number between Min_Rad[Index[3]] and Max_Rad[Index[3]])
                      • Set ExplosionRandomPoint[Index[3]] = (ExplosionTempPoint[Index[3]] offset by ExplosionAreaRandom[Index[3]] towards ExplosionRadius[Index[3]] degrees)
                      • Set ExplosionGroup[Index[3]] = (Units within ExplosionRadius[Index[3]] of ExplosionRandomPoint[Index[3]])
                      • Set ExplosionDamageInterval_2[Index[3]] = ExplosionDamageInterval[Index[3]]
                      • -------- Setting the variables --------
                      • -------- ---------- --------
                      • -------- We will now create the special Effect at the designated point --------
                      • Special Effect - Create a special effect at ExplosionRandomPoint[Index[3]] using ExplosionSFX
                      • Special Effect - Destroy (Last created special effect)
                      • Unit Group - Pick every unit in ExplosionGroup[Index[3]] 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 (Owner of ExplosionCaster[Index[3]])) Equal to True
                            • Then - Actions
                              • -------- We damage the Picked Unit --------
                              • Unit - Cause ExplosionCaster[Index[3]] to damage (Picked unit), dealing ExplosionRadius[Index[3]] damage of attack type Spells and damage type Fire
                            • Else - Actions
                      • Custom script: call RemoveLocation(udg_ExplosionRandomPoint[udg_Index[3]])
                      • Custom script: call DestroyGroup(udg_ExplosionGroup[udg_Index[3]])
                    • Else - Actions
                      • Set ExplosionDamageInterval_2[Index[3]] = (ExplosionDamageInterval_2[Index[3]] - 0.25)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ExplosionDuration[Index[3]] Equal to 0.00
                    • Then - Actions
                      • Custom script: call RemoveLocation(udg_ExplosionTempPoint[udg_Index[3]])
                      • Set ExplosionCaster[Index[3]] = No unit
                      • Set Index[1] = (Index[1] - 1)
                      • -------- we reduce the index[1] variable cause one spell instance has ended --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Index[1] Equal to 0
                        • Then - Actions
                          • Trigger - Turn off (This trigger)
                          • -------- we turn off this trigger, it is pointless for it to run if there isn't any spell for it to affect --------
                        • Else - Actions
                    • Else - Actions
                • Else - Actions
            • Else - Actions
Keywords:
Explosion, MUI, Dm251, Fire, Village, Template
Contents

[MUI] Explosion (Map)

Reviews
15 November 2015 BPower: Rejecting due to the status of this resource being "needs fix" for years. 14:07, 16th Jun 2010 TriggerHappy: Explosion? Way to generic of an idea.

Moderator

M

Moderator

15 November 2015
BPower: Rejecting due to the status of this resource being "needs fix" for years.

14:07, 16th Jun 2010
TriggerHappy:

Explosion? Way to generic of an idea.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
First of all, make the unit group non - arrayed as it is destroyed a few lines after its been created.

Second, filter the units when you set the group using units in range with matching conditions, use "and" and pick multiple so the units will be enemies from the start and dunno if it's meant to be like this but it damages buildings (well it's an explosion) but also you can filter out magic immune and dead units with this. This will get better performance instead of damaging all units
 
Top