Dirac
22710180
- Reaction score
- 147
Anti-Matter Image
Made By Dirac
>At my 300th post<
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)
ProsTurns 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.
-MUI
-Leakless
-Friendly code
-Nice animation
Cons
-Might lag
Screenshot (Looks better if you actually test it)
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
- If - Conditions
- Set MUICaster[MUI] = (Casting unit)
- Animation - Change (Casting unit)'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
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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
- If - Conditions
- 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
- If - Conditions
- 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])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - 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
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Set Wait[TempInteger] = 0.00
- Unit Group - Remove (Picked unit) from BlackHoleCasters
- Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
- Unit Group - Remove all units from MUITargets[TempInteger]
- Else - Actions
- If - Conditions
- Loop - Actions
- Unit Group - Pick every unit in BlackHoleCasters and do (Actions)
- Events
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])
- Loop - Actions
- Unit Group - Pick every unit in BlackHoleCasters and do (Actions)
- Events
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
- If - Conditions
- 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
- Events