Spell Anti-Matter Image

Dirac

22710180
Reaction score
147
Anti-Matter Image
Made By Dirac
>At my 300th post<

Introduction
Isn't there already enough black-hole type spells already? i dont really care, but i know for certain none of them is like this one. Why? keep reading
+rep is highly appreciated

Description (As In-Game)
Turns yourself into a living black-hole, atracking all non-black-holes units nearby and damaging them, while in this state you can move through dimensions, making you able to teleport short distances.

Level 1 - Minor damage dealt. Attraction range: 400. Teleport range: 400.
Level 2 - Average damage dealt. Attraction range: 600. Teleport range: 500.
Level 3 - High damage dealt. Attraction range: 800. Teleport range: 600.
Level 4 - Very high damage dealt. Attraction range: 1000. Teleport range: 700.

Lasts 10 seconds.
Pros
-MUI
-Leakless
-Friendly code
-Nice animation
Cons
-Might lag

Screenshot (Looks better if you actually test it)

wc3scrnshot031209150528.jpg


The Code
Trigger:
  • BlackHoleCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Anti-Matter Image
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI Less than or equal to 999
        • Then - Actions
          • Set MUI = (MUI + 1)
        • Else - Actions
          • Set MUI = 1
      • Set MUICaster[MUI] = (Casting unit)
      • Animation - Change (Casting unit)&#039;s vertex coloring to (5.00%, 5.00%, 5.00%) with 30.00% transparency
      • Unit - Set the custom value of (Casting unit) to MUI
      • Unit Group - Add (Casting unit) to BlackHoleCasters
Trigger:
  • BlackHoleSlide
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • (BlackHoleCasters is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in BlackHoleCasters and do (Actions)
        • Loop - Actions
          • Set TempInteger = (Custom value of (Picked unit))
          • Set TempPoint = (Position of MUICaster[TempInteger])
          • Set TempGroup = (Units within ((200.00 x (Real((Level of Anti-Matter Image for MUICaster[TempInteger])))) + 200.00) of TempPoint matching (((Matching unit) is in MUITargets[TempInteger]) Equal to False))
          • Unit Group - Add all units of TempGroup to MUITargets[TempInteger]
          • Custom script: call DestroyGroup (udg_TempGroup)
          • Set Wait[TempInteger] = (Wait[TempInteger] + 0.03)
          • Custom script: call RemoveLocation (udg_TempPoint)
          • Unit Group - Pick every unit in MUITargets[TempInteger] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) is A structure) Equal to False
                  • MUICaster[TempInteger] Not equal to (Picked unit)
                  • ((Picked unit) has buff Anti-Matter ) Equal to False
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MUISlide Greater than or equal to ((200.00 x (Real((Level of Anti-Matter Image for MUICaster[TempInteger])))) + 200.00)
                    • Then - Actions
                      • Unit Group - Remove (Picked unit) from MUITargets[TempInteger]
                    • Else - Actions
                  • Set TempPoint = (Position of MUICaster[TempInteger])
                  • Set TempPointArray[1] = (Position of (Picked unit))
                  • Set MUISlide = (Distance between TempPoint and TempPointArray[1])
                  • -------- To set the damage done per 0.03 seconds modify the values here --------
                  • Unit - Cause MUICaster[TempInteger] to damage (Picked unit), dealing (((250.00 x (Real((Level of Anti-Matter Image for MUICaster[TempInteger])))) + 200.00) / MUISlide) damage of attack type Spells and damage type Normal
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MUISlide Less than or equal to 100.00
                    • Then - Actions
                      • Set MUISlide = 0.00
                    • Else - Actions
                  • Set TempPointArray[2] = (TempPointArray[1] offset by (1500.00 / MUISlide) towards (Angle from TempPointArray[1] to TempPoint) degrees)
                  • Unit - Move (Picked unit) instantly to TempPointArray[2]
                  • Custom script: call RemoveLocation (udg_TempPoint)
                  • Custom script: call RemoveLocation (udg_TempPointArray[1])
                  • Custom script: call RemoveLocation (udg_TempPointArray[2])
                • Else - Actions
          • -------- To set the duration modify the condition here. (Remember to Modify the spell duration in the object editor) --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • Wait[TempInteger] Greater than or equal to 10.00
                  • (MUICaster[TempInteger] is dead) Equal to True
            • Then - Actions
              • Set Wait[TempInteger] = 0.00
              • Unit Group - Remove (Picked unit) from BlackHoleCasters
              • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Unit Group - Remove all units from MUITargets[TempInteger]
            • Else - Actions
Trigger:
  • BlackHoleEyecandy
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
      • (BlackHoleCasters is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in BlackHoleCasters and do (Actions)
        • Loop - Actions
          • Set TempInteger = (Custom value of (Picked unit))
          • Set TempPoint = (Position of MUICaster[TempInteger])
          • Set TempPointArray[1] = (TempPoint offset by (Random real number between 0.00 and 400.00) towards (Random angle) degrees)
          • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\FlameStrike\FlameStrikeTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Create 1 Lightning for (Owner of (Picked unit)) at TempPointArray[1] facing Default building facing degrees
          • Unit - Add a 0.30 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_TempPoint)
          • Custom script: call RemoveLocation (udg_TempPointArray[1])
Trigger:
  • BlackHoleMove
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(smart))
      • ((Triggering unit) has buff Anti-Matter ) Equal to True
      • ((Triggering unit) is in BlackHoleMovers) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to BlackHoleMovers
      • Set TempPointArray[1] = (Position of (Triggering unit))
      • Set TempPoint = (Target point of issued order)
      • Set MUISlide = (Distance between TempPointArray[1] and TempPoint)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUISlide Greater than or equal to ((100.00 x (Real((Level of Anti-Matter Image for (Triggering unit))))) + 300.00)
        • Then - Actions
          • -------- Modify maximum teleport here --------
          • Set MUISlide = ((100.00 x (Real((Level of Anti-Matter Image for (Triggering unit))))) + 300.00)
        • Else - Actions
      • Set TempPointArray[2] = (TempPointArray[1] offset by MUISlide towards (Angle from TempPointArray[1] to TempPoint) degrees)
      • Unit - Move (Triggering unit) instantly to TempPointArray[2], facing (Angle from TempPointArray[1] to TempPoint) degrees
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call RemoveLocation (udg_TempPointArray[1])
      • Custom script: call RemoveLocation (udg_TempPointArray[2])
      • -------- Modify teleport delay here --------
      • Wait 1.50 seconds
      • Unit Group - Remove (Triggering unit) from BlackHoleMovers
 

Dirac

22710180
Reaction score
147
Updates
v1.1
-Units now spin around the black hole
-Improved EyeCandy (please suggest ideas!)
v1.0.1
-Added some customization features
-Fixed loading screen
 

Azlier

Old World Ghost
Reaction score
461
>-Friendly code
Pah! Yeah, right!

Hmm. I didn't spot any leaks, but there is no configuration header. Where do you expect people to easily change aspects of the spell?
 

Dirac

22710180
Reaction score
147
>-Friendly code
Pah! Yeah, right!

Hmm. I didn't spot any leaks, but there is no configuration header. Where do you expect people to easily change aspects of the spell?

Lol i guess i should improve that part. But that will cause the creation of many useless variables in order to set those values
 

Azlier

Old World Ghost
Reaction score
461
They're not useless if they help.
 

Dirac

22710180
Reaction score
147
They're not useless if they help.

Done, new version (1.0.1) now has:
Damage variable (controls DPS done to units close)
Range variable (controls the maximum range of the hole)
Teleport variable (controls the maximum range of the teleportation while moving)
 

BlackRose

Forum User
Reaction score
239
I've tested it and:
1. Please just insert images here, I don't like clicking link images.
2. It's really... weird... all those swirly black things....
3. It's ok...but it doesn't really act like a black hole, they don't twirl around into you?
 

gameman

It's been a long, long time.
Reaction score
96
Anti matter is matter with its charges reversed, so if anti matter touches matter they combine and release ALOTA energy. Just in case your wondering I just had to say that.

Good job in any case.
 

Dirac

22710180
Reaction score
147
Here we go. Update 1.1...
Thanks to BlackRose for the twirl idea
EyeCandy was improved, but i think it still needs some improvements. Any idea suggested gets +rep (please avoid the use of custom models)
 

BlackRose

Forum User
Reaction score
239
  • It spins your allies?
  • It's good, but it's just spinning, shouldn't it spin into the core.
  • Try pressing "T" to cast it, IT DOESN'T WORK!!
 

Pyroflame

New Member
Reaction score
4
Anti matter is matter with its charges reversed, so if anti matter touches matter they combine and release ALOTA energy. Just in case your wondering I just had to say that.

Good job in any case.

They don't combine, they destroy each other.

I like the spell, I just don't like how the units stop abruptly when the spell ends.
 

MagnaGuard

Active Member
Reaction score
49
How about at the end of the spell beams of light (Revive model angled) shoot out of the whole and it blows up and everyone is flung away !
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top