• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Refraction Assault v1.0 by BetaGod

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
REFRACTION ASSAULT v1.0
By BetaGod

581126_10150696678039143_629724142_9543309_988002847_n.jpg

Spawns a few images of the hero equal to the number of enemies in the casting area. Every image will rush forward until it fades. Enemies that get in contact of one of this images will proc an unstable current that cause an explosion of damage on them in a tiny AoE (90). If no enemies are nearby, the spell won't have any effect, mana will be consumed and cooldown will trigger anyway.

Level 1 - 450 AoE, each pulse deals 25-75 damage.

Level 2 - 575 AoE, each pulse deals 75-125 damage.

Level 3 - Level 3 - 675 AoE, each pulse deals 125-200 damage.


  • Refraction Assault Int
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Refraction Assault
    • Actions
      • -------- ---------------------------------------------------------------- --------
      • -------- Don't touch this settings --------
      • -------- ---------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RA_Skip Equal to 0
        • Then - Actions
          • Trigger - Turn on Refraction Assault Loop <gen>
        • Else - Actions
      • Set RA_Skip = (RA_Skip + 1)
      • Set RA_Times = (RA_Times + 1)
      • Set RA_Off[RA_Times] = True
      • Set RA_Timer[RA_Times] = 0.00
      • Set RA_Caster[RA_Times] = (Triggering unit)
      • Set RA_Player[RA_Times] = (Owner of RA_Caster[RA_Times])
      • Set RA_Heightl[RA_Times] = 0.00
      • Set RA_Distance[RA_Times] = 0.00
      • Set RA_AbilityLevel[RA_Times] = (Level of (Ability being cast) for RA_Caster[RA_Times])
      • Set RA_Location[RA_Times] = (Position of RA_Caster[RA_Times])
      • -------- ---------------------------------------------------------------- --------
      • -------- AoE of enemy seeking settings --------
      • -------- ---------------------------------------------------------------- --------
      • Set RA_Aoe[RA_Times] = (((Real(RA_AbilityLevel[RA_Times])) x 100.00) + 350.00)
      • -------- ---------------------------------------------------------------- --------
      • -------- Damage settings below (i wanted to make it a little bit random) --------
      • -------- ---------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RA_AbilityLevel[RA_Times] Equal to 1
        • Then - Actions
          • Set RA_Damage[RA_Times] = (Random real number between 50.00 and 75.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RA_AbilityLevel[RA_Times] Equal to 2
            • Then - Actions
              • Set RA_Damage[RA_Times] = (Random real number between 75.00 and 125.00)
            • Else - Actions
              • Set RA_Damage[RA_Times] = (Random real number between 125.00 and 200.00)
      • -------- ---------------------------------------------------------------- --------
      • -------- Special effects shown on illusions --------
      • -------- ---------------------------------------------------------------- --------
      • Set RA_SFX1 = units\orc\HeroBladeMaster\HeroBladeMaster.mdl
      • Set RA_SFX2 = Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
      • Set RA_SFX3 = Abilities\Spells\Human\Banish\BanishTarget.mdl
      • -------- ---------------------------------------------------------------- --------
      • -------- Static pulse SFX --------
      • -------- ---------------------------------------------------------------- --------
      • Set RA_SFX4 = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • -------- ---------------------------------------------------------------- --------
      • -------- Don't touch this one --------
      • -------- ---------------------------------------------------------------- --------
      • Set RA_DummyGroup[RA_Times] = (Units within RA_Aoe[RA_Times] of RA_Location[RA_Times] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an enemy of RA_Player[RA_Times]) Equal to True)))

  • Refraction Assault Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • -------- ---------------------------------------------------------------- --------
      • -------- Don't touch this settings --------
      • -------- ---------------------------------------------------------------- --------
      • For each (Integer RA) from 1 to RA_Times, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RA_Off[RA] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RA_Distance[RA] Equal to RA_Aoe[RA]
                • Then - Actions
                  • Custom script: call RemoveLocation(udg_RA_Location[udg_RA])
                  • Set RA_Distance[RA] = 0.00
                  • Set RA_Height[RA] = 0.00
                  • Set RA_Skip = (RA_Skip - 1)
                  • Set RA_Off[RA] = False
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RA_Skip Equal to 0
                    • Then - Actions
                      • Set RA_Times = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
                  • Set RA_Timer[RA] = (RA_Timer[RA] + 0.02)
                  • Set RA_Distance[RA] = (RA_Distance[RA] + 6.00)
                  • Set RA_Height[RA] = (RA_Height[RA] + 1.00)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RA_Timer[RA] Greater than or equal to 0.20
                      • RA_Distance[RA] Less than RA_Aoe[RA]
                    • Then - Actions
                      • Set RA_Timer[RA] = 0.00
                      • Unit Group - Pick every unit in RA_DummyGroup[RA] and do (Actions)
                        • Loop - Actions
                          • Set RA_Location3[RA] = (Position of (Picked unit))
                          • Set RA_Location2[RA] = (RA_Location[RA] offset by RA_Distance[RA] towards (Angle from RA_Location[RA] to RA_Location3[RA]) degrees)
                          • Set RA_Group[RA] = (Units within 90.00 of RA_Location2[RA] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an enemy of RA_Player[RA]) Equal to True)))
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Playable map area) contains RA_Location2[RA]) Equal to True
                            • Then - Actions
                              • Unit - Create 1 Dummy for RA_Player[RA] at RA_Location2[RA] facing (Angle from RA_Location[RA] to RA_Location3[RA]) degrees
                              • Set RA_Dummy[RA] = (Last created unit)
                              • Animation - Change RA_Dummy[RA]'s vertex coloring to (100.00%, 100.00%, 100.00%) with RA_Height[RA]% transparency
                              • Animation - Change RA_Dummy[RA]'s size to (80.00%, 80.00%, 80.00%) of its original size
                              • Animation - Change RA_Dummy[RA]'s animation speed to 0.00% of its original speed
                              • Animation - Change RA_Dummy[RA] flying height to -50.00 at 1000.00
                              • Special Effect - Create a special effect attached to the chest of RA_Dummy[RA] using RA_SFX1
                              • Set RA_Effect1[RA] = (Last created special effect)
                              • Special Effect - Create a special effect attached to the chest of RA_Dummy[RA] using RA_SFX2
                              • Set RA_Effect2[RA] = (Last created special effect)
                              • Special Effect - Create a special effect attached to the chest of RA_Dummy[RA] using RA_SFX3
                              • Set RA_Effect3[RA] = (Last created special effect)
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Pick every unit in RA_Group[RA] and do (Actions)
                                • Loop - Actions
                                  • Special Effect - Create a special effect attached to the chest of RA_Dummy[RA] using RA_SFX4
                                  • Special Effect - Destroy (Last created special effect)
                                  • Unit - Cause RA_Caster[RA] to damage (Picked unit), dealing RA_Damage[RA] damage of attack type Spells and damage type Normal
                              • Unit - Add a 0.60 second Generic expiration timer to RA_Dummy[RA]
                            • Else - Actions
                          • Custom script: call RemoveLocation(udg_RA_Location2[udg_RA])
                          • Custom script: call RemoveLocation(udg_RA_Location3[udg_RA])
                          • Special Effect - Destroy RA_Effect1[RA]
                          • Special Effect - Destroy RA_Effect2[RA]
                          • Special Effect - Destroy RA_Effect3[RA]
                    • Else - Actions
            • Else - Actions

v1.0 changelog:
-Public Release

Keywords:
illusion, split, direction, aoe
Contents

Refraction Assault v1.0 by BetaGod (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Required changes RA damage only supports 3 levels, make it support any number of levels RA_DummyGroup leaks RA_Effect1, 2 and 3 are destroyed in a wrong place Suggested changes...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

Reviewed by Maker, Refraction Assault v1.0, 17th Jul 2012

Required changes
  • RA damage only supports 3 levels, make it support any number of levels
  • RA_DummyGroup leaks
  • RA_Effect1, 2 and 3 are destroyed in a wrong place
Suggested changes
  • RALocation2 and 3 could be non-array variables
 
Level 20
Joined
Jul 12, 2010
Messages
1,735
  • Set RA_DummyGroup[RA_Times] = (Units within RA_Aoe[RA_Times] of RA_Location[RA_Times] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an enemy of RA_Player[RA_Times]) Equal to True)))
you forgot to check for magic immune units in this action;)

other than that spell is MUI and leak-less gj 4/5 :thumbs_up:
 
Level 11
Joined
May 13, 2010
Messages
167
@BeTaGod-, are you using any particular spell template to index the spell?
You don't need arrays on every single variable, such as (Position of (Picked unit)); it will normally loop through them, without any collisions.

Yup, i create every new spell from the previous one.. so variables are just modified to fit. I will work on an update now :)


RA_DummyGroup[RA_Times] leaks.

I see.. thanks for pointing that out! Will fix it soon :grin:
 
Top