R@i_no_Wyrm
New Member
- Reaction score
- 43
Dark Hole
This spell is MUI/GUI
Maybe some of us have known Enigma's dark hole. Why don't make an improved one? This dark hole won't just drag everyone in. It grows... and suck units, even the caster, even the corpse! After, the dark hole will explode, killing units inside and around it.
How to Import the spell :
Copy the 2 units 'dummy' and 'Dark Hole Dummy' on the object editor.
Also, copy the 'Dark Hole' skill on the ability editor.
Then, copy the 2 spell triggers
Edit the numbers and constants if you wish.
Skill Description :
Creates a hole of complete darkness that will absorb every units including you, your allies and even corpses into it while growing bigger and bigger. Units get too close will be sucked in, making the dark hole even bigger. The bigger the hole, the greater is the area of effect. After some time passed or if the dark hole reached its maximum size, the dark hole will explode, dealing damage equal to its size to units in AoE.
Lv1 = 850 max size, 5 seconds duration
Lv2 = 1100 max size, 6 seconds duration
Lv3 = 1350 max size, 7 seconds duration.
Triggers :
1st one, when you cast the skills :
Code:
Dark Hole
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Dark Hole
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
count Equal to 100
Then - Actions
Set count = 1
Else - Actions
Set count = (count + 1)
Set leakstop_location = (Target point of ability being cast)
Unit - Create 1 Dark Hole Dummy for (Owner of (Triggering unit)) at leakstop_location facing Default building facing degrees
Set darkhole_dummyunit[count] = (Last created unit)
Set darkhole_maxsize[count] = (600 + (250 x (Level of Dark Hole for (Triggering unit))))
Set darkhole_size[count] = (100 + (100 x (Level of Dark Hole for (Triggering unit))))
Set darkhole_duration[count] = (200 + (50 x (Level of Dark Hole for (Triggering unit))))
Set owner_of_darkhole[count] = (Owner of (Triggering unit))
Unit Group - Remove all units from darkhole_units_sucked[count]
Custom script: call RemoveLocation(udg_leakstop_location)
And second (and the last), dragging units, explode the darkhole, grow it up, and suck units inside :
Code:
Dark Hole Suck
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Set leakstop_unitgroup = (Units of type Dark Hole Dummy)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in leakstop_unitgroup) Greater than 0
Then - Actions
Else - Actions
Skip remaining actions
For each (Integer A) from 1 to 100, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
darkhole_dummyunit[(Integer A)] Not equal to No unit
Then - Actions
Set darkhole_size[(Integer A)] = (darkhole_size[(Integer A)] + 1)
Set darkhole_duration[(Integer A)] = (darkhole_duration[(Integer A)] - 1)
Animation - Change darkhole_dummyunit[(Integer A)]'s size to ((100.00 + ((Real(darkhole_size[(Integer A)])) / 10.00))%, (100.00 + ((Real(darkhole_size[(Integer A)])) / 10.00))%, 100.00%) of its original size
Animation - Change darkhole_dummyunit[(Integer A)] flying height to ((Current flying height of darkhole_dummyunit[(Integer A)]) + 2.00) at 2.00
Set point2 = (Position of darkhole_dummyunit[(Integer A)])
-------- Explode the darkhole --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
darkhole_size[(Integer A)] Greater than or equal to darkhole_maxsize[(Integer A)]
darkhole_duration[(Integer A)] Less than or equal to 0
Then - Actions
Set units_around_darkhole = (Units within (Real(darkhole_size[(Integer A)])) of point2 matching (((Matching unit) is A structure) Equal to False))
Unit Group - Pick every unit in units_around_darkhole and do (Actions)
Loop - Actions
Unit - Cause darkhole_dummyunit[(Integer A)] to damage (Picked unit), dealing ((Real(darkhole_size[(Integer A)])) / 2.00) damage of attack type Spells and damage type Normal
Animation - Change (Picked unit) flying height to (Default flying height of (Picked unit)) at 1000.00
Custom script: call DestroyGroup(udg_units_around_darkhole)
Unit - Kill darkhole_dummyunit[(Integer A)]
Set darkhole_dummyunit[(Integer A)] = No unit
Unit Group - Pick every unit in darkhole_units_sucked[(Integer A)] and do (Actions)
Loop - Actions
Unit - Create 1 Dummy for owner_of_darkhole[(Integer A)] at point2 facing Default building facing degrees
Unit - Cause (Last created unit) to damage (Picked unit), dealing ((Real(darkhole_size[(Integer A)])) / 1.00) damage of attack type Spells and damage type Normal
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Move (Picked unit) instantly to point2
Unit - Unhide (Picked unit)
Unit Group - Remove all units from darkhole_units_sucked[count]
Custom script: call RemoveLocation(udg_point2)
Skip remaining actions
Else - Actions
-------- Drag to darkhole --------
Set units_around_darkhole = (Units within (Real(darkhole_size[(Integer A)])) of point2 matching (((Matching unit) is A structure) Equal to False))
Unit Group - Pick every unit in units_around_darkhole and do (Actions)
Loop - Actions
Unit - Add Storm Crow Form to (Picked unit)
Animation - Change (Picked unit) flying height to (Current flying height of darkhole_dummyunit[(Integer A)]) at 75.00
Unit - Remove Storm Crow Form from (Picked unit)
Set point1 = (Position of (Picked unit))
Set leakstop_location = (point1 offset by ((Real(darkhole_size[(Integer A)])) / 200.00) towards (Angle from point1 to point2) degrees)
Unit - Move (Picked unit) instantly to leakstop_location
Custom script: call RemoveLocation(udg_point1)
Custom script: call RemoveLocation(udg_leakstop_location)
Custom script: call DestroyGroup(udg_units_around_darkhole)
-------- Suck nearby units --------
Set units_around_darkhole = (Units within ((Real(darkhole_size[(Integer A)])) / 8.00) of point2 matching (((Matching unit) is A structure) Equal to False))
Unit Group - Pick every unit in units_around_darkhole and do (Actions)
Loop - Actions
Animation - Change (Picked unit) flying height to (Default flying height of (Picked unit)) at 1000.00
Unit Group - Add (Picked unit) to darkhole_units_sucked[(Integer A)]
Unit - Hide (Picked unit)
Set darkhole_size[(Integer A)] = (darkhole_size[(Integer A)] + 75)
Animation - Change darkhole_dummyunit[(Integer A)]'s size to ((100.00 + ((Real(darkhole_size[(Integer A)])) / 10.00))%, (100.00 + ((Real(darkhole_size[(Integer A)])) / 10.00))%, 100.00%) of its original size
Custom script: call DestroyGroup(udg_units_around_darkhole)
Custom script: call RemoveLocation(udg_point2)
Else - Actions
Custom script: call DestroyGroup(udg_leakstop_unitgroup)
Bugs, Errors, leaks and typo please post here.