• 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.

Void Sphere v1.4

Description

Triggers

Changelogs

Summons a dark sphere of energy,covering an area of 600 radius.Units who come inside the sphere will be pulled towards the center,taking damage over time and freezing its health.If the unit reaches the center,the unit will be thrown outward the sphere in a distance of 600 units and will take damage.If a unit's life drops to 10%,the unit will explode to death.Lasts for a few seconds.
|cffffcc00Level 1|r - 10 DPS,100 Impact Damage,6 second duration.
|cffffcc00Level 2|r - 15 DPS,150 Impact Damage,9 second duration.
|cffffcc00Level 3|r - 20 DPS,200 Impact Damage,12 second duration.

Remove unit in this spells is strictly illegal to be used because it causes map crash

Setup

Cast

Loop

[trigger=]VS Setup
Events
Map initialization
Conditions
Actions
Custom script: set udg_VS_Hash = InitHashtable()
-------- --------------------------------- --------
-------- CONFIGURATION --------
-------- --------------------------------- --------
Set VS_Loop = 0.03
Trigger - Add to VS Loop <gen> the event (Time - Every VS_Loop seconds of game time)
-------- --------------------------------- --------
-------- Determines the duration --------
-------- --------------------------------- --------
Set VS_DurationBase = 3.00
Set VS_DurationPerLevel = 3.00
-------- --------------------------------- --------
-------- Determines the dps(damage per second) --------
-------- --------------------------------- --------
Set VS_DPSBase = 5.00
Set VS_DPSPerLevel = 5.00
-------- --------------------------------- --------
-------- Determines the impact damage --------
-------- --------------------------------- --------
Set VS_ImpactDamageBase = 50.00
Set VS_DamagePerLevel = 50.00
-------- --------------------------------- --------
-------- Determines the life drop explosion --------
-------- --------------------------------- --------
Set VS_LifeBlow = 10.00
-------- --------------------------------- --------
-------- Determines the Radius,layer thickness,segment per layer,layer number --------
-------- --------------------------------- --------
Set VS_Radius = 600.00
Set VS_LayerThickness = 50.00
Set VS_LayerNumber = ((Integer(VS_Radius)) / (Integer(VS_LayerThickness)))
Set VS_LayerSegment = VS_LayerNumber
-------- --------------------------------- --------
-------- Determines the lightning effects for the sphere --------
-------- --------------------------------- --------
Set VS_LSphereCode = CLPB
Set VS_LSphereBlue = 1.00
Set VS_LSphereGreen = 0.00
Set VS_LSphereRed = 1.00
-------- --------------------------------- --------
-------- Determines the lightning effects for the unit pulled --------
-------- --------------------------------- --------
Set VS_LPullCode = AFOD
Set VS_LPullBlue = 1.00
Set VS_LPullGreen = 0.00
Set VS_LPullRed = 1.00
-------- --------------------------------- --------
-------- Determines the pulling speed --------
-------- --------------------------------- --------
Set VS_PullSpeed = (300.00 x VS_Loop)
-------- --------------------------------- --------
-------- Determines the throwing speed --------
-------- --------------------------------- --------
Set VS_ThrowSpeed = (300.00 x VS_Loop)
-------- --------------------------------- --------
-------- Determines the height of the throw arc --------
-------- --------------------------------- --------
Set VS_ArcThrowHeightBase = 600.00
-------- --------------------------------- --------
-------- Determines the segment outward speed --------
-------- --------------------------------- --------
Set VS_ArcSpeed = (300.00 x VS_Loop)
-------- --------------------------------- --------
-------- Determines the height of the arc segment --------
-------- --------------------------------- --------
Set VS_ArcSphereHeightBase = 600.00
-------- --------------------------------- --------
-------- Determines the delay of the segment release --------
-------- --------------------------------- --------
Set VS_SegmentDelay = 0.30
-------- --------------------------------- --------
-------- Determines the model of the center --------
-------- --------------------------------- --------
Set VS_SFX[1] = Abilities\Spells\Undead\Possession\PossessionCaster.mdl
-------- --------------------------------- --------
-------- Determines the scale of the center --------
-------- --------------------------------- --------
Set VS_CenterScale = 500.00
-------- --------------------------------- --------
-------- Determines the model of the segment --------
-------- --------------------------------- --------
Set VS_SFX[2] = Abilities\Spells\Undead\Possession\PossessionTarget.mdl
-------- --------------------------------- --------
-------- Determines the scale of the center --------
-------- --------------------------------- --------
Set VS_SegmentScale = 100.00
-------- --------------------------------- --------
-------- Determines the sfx when a unit explodes --------
-------- --------------------------------- --------
Set VS_SFX[3] = Abilities\Spells\Undead\DarkRitual\DarkRitualCaster.mdl
-------- --------------------------------- --------
-------- Determines the sfx when a unit impacts --------
-------- --------------------------------- --------
Set VS_SFX[4] = Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-------- --------------------------------- --------
-------- Determines the sfx when a segment drops --------
-------- --------------------------------- --------
Set VS_SFX[5] = Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
[/trigger]
[trigger=]VS Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Void Sphere
Actions
-------- --------------------------------- --------
-------- Variables --------
-------- --------------------------------- --------
Set VS_Caster = (Triggering unit)
Set VS_Owner = (Triggering player)
Set VS_TargetLoc = (Target point of ability being cast)
Set VS_Levels = (Level of Void Sphere for VS_Caster)
-------- --------------------------------- --------
-------- Creating Center --------
-------- --------------------------------- --------
Unit - Create 1 Dummy for VS_Owner at VS_TargetLoc facing Default building facing degrees
Set VS_Center = (Last created unit)
Custom script: set udg_VS_CenterKey = GetHandleId(udg_VS_Center)
-------- --------------------------------- --------
-------- Adding Duration --------
-------- --------------------------------- --------
Unit - Add a (VS_DurationBase + (VS_DurationPerLevel x (Real(VS_Levels)))) second Generic expiration timer to VS_Center
-------- --------------------------------- --------
-------- Adding Model then scale --------
-------- --------------------------------- --------
Special Effect - Create a special effect attached to the chest of VS_Center using VS_SFX[1]
Hashtable - Save Handle Of(Last created special effect) as (Key Model) of VS_CenterKey in VS_Hash
Animation - Change VS_Center's size to (VS_CenterScale%, 0.00%, 0.00%) of its original size
-------- --------------------------------- --------
-------- Saving --------
-------- --------------------------------- --------
Hashtable - Save Handle OfVS_Owner as (Key Owner) of VS_CenterKey in VS_Hash
Hashtable - Save VS_Levels as (Key Levels) of VS_CenterKey in VS_Hash
Hashtable - Save 1 as (Key Group) of VS_CenterKey in VS_Hash
Unit Group - Add VS_Center to VS_LoopGroup
Trigger - Turn on VS Loop <gen>
Custom script: call RemoveLocation(udg_VS_TargetLoc)
[/trigger]
[trigger=]VS Loop
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(VS_LoopGroup is empty) Equal to False
Then - Actions
Unit Group - Pick every unit in VS_LoopGroup and do (Actions)
Loop - Actions
Set VS_U = (Picked unit)
Custom script: set udg_VS_Key = GetHandleId(udg_VS_U)
Set VS_GroupID = (Load (Key Group) of VS_Key from VS_Hash)
-------- --------------------------------- --------
-------- Starting Loop --------
-------- --------------------------------- --------
-------- --------------------------------- --------
-------- CenterGroup --------
-------- --------------------------------- --------
Set VS_Loc = (Position of VS_U)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_GroupID Equal to 1
Then - Actions
-------- --------------------------------- --------
-------- Load --------
-------- --------------------------------- --------
Set VS_Owner = (Load (Key Owner) of VS_Key in VS_Hash)
Set VS_Levels = (Load (Key Levels) of VS_Key from VS_Hash)
Set VS_TempDelay = (Load (Key Delay) of VS_Key from VS_Hash)
-------- --------------------------------- --------
-------- Check if CurrentTime hasnt reached max time --------
-------- --------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(VS_U is alive) Equal to True
Then - Actions
-------- --------------------------------- --------
-------- Check if delay has reached its max time --------
-------- --------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_TempDelay Greater than VS_SegmentDelay
Then - Actions
-------- --------------------------------- --------
-------- Creating Segment --------
-------- --------------------------------- --------
For each (Integer VS_Integer) from 1 to VS_LayerSegment, do (Actions)
Loop - Actions
Set VS_SegmentDegrees = ((Real(VS_Integer)) x (360.00 / (Real(VS_LayerSegment))))
Unit - Create 1 Dummy for VS_Owner at VS_Loc facing VS_SegmentDegrees degrees
Set VS_Segment = (Last created unit)
Custom script: set udg_VS_SegmentKey = GetHandleId(udg_VS_Segment)
Special Effect - Create a special effect attached to the chest of VS_Segment using VS_SFX[2]
Hashtable - Save Handle Of(Last created special effect) as (Key Model) of VS_SegmentKey in VS_Hash
Animation - Change VS_Segment's size to (VS_SegmentScale%, 0.00%, 0.00%) of its original size
-------- --------------------------------- --------
-------- Attaching the lightning to the first(to this loop)segment,but first check --------
-------- --------------------------------- --------
Set VS_LoadSegment = (Load VS_Integer of VS_Key in VS_Hash)
-------- --------------------------------- --------
-------- Getting Coordinates --------
-------- --------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_LoadSegment Not equal to No unit
Then - Actions
Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_Segment)
Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_Segment)
Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_Segment)
Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_LoadSegment)
Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_LoadSegment)
Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_LoadSegment)
Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LSphereCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
Lightning - Change color of VS_Lightning to (VS_LSphereRed VS_LSphereGreen VS_LSphereBlue) with 1.00 alpha
Hashtable - Save Handle OfVS_Lightning as (Key SphereLoad) of VS_SegmentKey in VS_Hash
Hashtable - Save Handle OfVS_LoadSegment as 1 of VS_SegmentKey in VS_Hash
Else - Actions
Hashtable - Save Handle OfVS_Segment as VS_Integer of VS_Key in VS_Hash
For each (Integer VS_Integer) from 1 to VS_LayerSegment, do (Actions)
Loop - Actions
Set VS_Segment = (Load VS_Integer of VS_Key in VS_Hash)
Custom script: set udg_VS_SegmentKey = GetHandleId(udg_VS_Segment)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_Integer Equal to VS_LayerSegment
Then - Actions
Set VS_LoadSegment = (Load 1 of VS_Key in VS_Hash)
Else - Actions
Set VS_LoadSegment = (Load (VS_Integer + 1) of VS_Key in VS_Hash)
Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_Segment)
Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_Segment)
Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_Segment)
Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_LoadSegment)
Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_LoadSegment)
Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_LoadSegment)
Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LSphereCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
Lightning - Change color of VS_Lightning to (VS_LSphereRed VS_LSphereGreen VS_LSphereBlue) with 1.00 alpha
Hashtable - Save Handle OfVS_Lightning as (Key SphereLoadLayer) of VS_SegmentKey in VS_Hash
Hashtable - Save Handle OfVS_LoadSegment as 2 of VS_SegmentKey in VS_Hash
Set VS_SegmentTravelled = 0.00
Hashtable - Save VS_SegmentTravelled as (Key Travelled) of VS_SegmentKey in VS_Hash
Hashtable - Save 2 as (Key Group) of VS_SegmentKey in VS_Hash
Unit Group - Add VS_Segment to VS_LoopGroup
Set VS_TempDelay = 0.00
Hashtable - Save VS_TempDelay as (Key Delay) of VS_Key in VS_Hash
Else - Actions
Hashtable - Save (VS_TempDelay + VS_Loop) as (Key Delay) of VS_Key in VS_Hash
-------- --------------------------------- --------
-------- Picking Units --------
-------- --------------------------------- --------
Set VS_TempGroup = (Units within VS_Radius of VS_Loc)
Unit Group - Pick every unit in VS_TempGroup and do (Actions)
Loop - Actions
Set VS_Picked = (Picked unit)
Custom script: set udg_VS_PickedKey = GetHandleId(udg_VS_Picked)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(VS_Picked is A structure) Equal to False
(VS_Picked is Magic Immune) Equal to False
(VS_Picked is alive) Equal to True
(VS_Picked belongs to an enemy of VS_Owner) Equal to True
(VS_Picked is in VS_LoopGroup) Equal to False
Then - Actions
Hashtable - Save 3 as (Key Group) of VS_PickedKey in VS_Hash
Hashtable - Save Handle OfVS_U as 1 of VS_PickedKey in VS_Hash
Hashtable - Save VS_Levels as (Key Levels) of VS_PickedKey in VS_Hash
Hashtable - Save (Life of VS_Picked) as (Key Life) of VS_PickedKey in VS_Hash
Unit Group - Add VS_Picked to VS_LoopGroup
Else - Actions
Custom script: call DestroyGroup(udg_VS_TempGroup)
Hashtable - Save (VS_TempDelay + VS_Loop) as (Key Delay) of VS_Key in VS_Hash
Else - Actions
Set VS_DestroySFX = (Load (Key Model) of VS_Key in VS_Hash)
Special Effect - Destroy VS_DestroySFX
Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
Unit Group - Remove VS_U from VS_LoopGroup
Unit - Remove VS_U from the game
Else - Actions
-------- --------------------------------- --------
-------- SegmentGroup --------
-------- --------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_GroupID Equal to 2
Then - Actions
-------- --------------------------------- --------
-------- Load --------
-------- --------------------------------- --------
Set VS_SegmentTravelled = (Load (Key Travelled) of VS_Key from VS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_SegmentTravelled Less than VS_Radius
Then - Actions
-------- --------------------------------- --------
-------- Moving --------
-------- --------------------------------- --------
Set VS_Offset = (VS_Loc offset by VS_ArcSpeed towards (Facing of VS_U) degrees)
Unit - Move VS_U instantly to VS_Offset
Custom script: call RemoveLocation(udg_VS_Offset)
-------- --------------------------------- --------
-------- Applying Height --------
-------- --------------------------------- --------
Set VS_Arc = (((4.00 x VS_ArcSphereHeightBase) / VS_Radius) x (((VS_SegmentTravelled + VS_ArcSpeed) / VS_Radius) x (VS_Radius - (VS_SegmentTravelled + VS_ArcSpeed))))
Animation - Change VS_U flying height to VS_Arc at 0.00
-------- --------------------------------- --------
-------- Coordinates X and Y --------
-------- --------------------------------- --------
Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_U)
Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_U)
Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_U) + 50
-------- --------------------------------- --------
-------- First --------
-------- --------------------------------- --------
Set VS_LoadSegment = (Load 1 of VS_Key in VS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_LoadSegment Not equal to No unit
Then - Actions
Set VS_Lightning = (Load (Key SphereLoad) of VS_Key in VS_Hash)
Lightning - Destroy VS_Lightning
Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_LoadSegment)
Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_LoadSegment)
Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_LoadSegment) + 50
Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LSphereCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
Lightning - Change color of VS_Lightning to (VS_LSphereRed VS_LSphereGreen VS_LSphereBlue) with 1.00 alpha
Hashtable - Save Handle OfVS_Lightning as (Key SphereLoad) of VS_Key in VS_Hash
Else - Actions
-------- --------------------------------- --------
-------- Co-Layer --------
-------- --------------------------------- --------
Set VS_LoadSegment = (Load 2 of VS_Key in VS_Hash)
Set VS_Lightning = (Load (Key SphereLoadLayer) of VS_Key in VS_Hash)
Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_LoadSegment)
Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_LoadSegment)
Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_LoadSegment) + 50
Custom script: call MoveLightningEx(udg_VS_Lightning,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
-------- --------------------------------- --------
-------- Saving --------
-------- --------------------------------- --------
Hashtable - Save (VS_SegmentTravelled + VS_ArcSpeed) as (Key Travelled) of VS_Key in VS_Hash
Else - Actions
Special Effect - Create a special effect at VS_Loc using VS_SFX[5]
Special Effect - Destroy (Last created special effect)
Set VS_Lightning = (Load (Key SphereLoad) of VS_Key in VS_Hash)
Lightning - Destroy VS_Lightning
Set VS_Lightning = (Load (Key SphereLoadLayer) of VS_Key in VS_Hash)
Lightning - Destroy VS_Lightning
Set VS_DestroySFX = (Load (Key Model) of VS_Key in VS_Hash)
Special Effect - Destroy VS_DestroySFX
Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
Unit Group - Remove VS_U from VS_LoopGroup
Unit - Remove VS_U from the game
Else - Actions
-------- --------------------------------- --------
-------- PullGroup --------
-------- --------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_GroupID Equal to 3
Then - Actions
-------- --------------------------------- --------
-------- Load --------
-------- --------------------------------- --------
Set VS_TempCenter = (Load 1 of VS_Key in VS_Hash)
Set VS_Lightning = (Load (Key PullLoad) of VS_Key in VS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(VS_U is dead) Equal to True
Then - Actions
Lightning - Destroy VS_Lightning
Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
Unit Group - Remove VS_U from VS_LoopGroup
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_TempCenter Equal to No unit
Then - Actions
Lightning - Destroy VS_Lightning
Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
Unit Group - Remove VS_U from VS_LoopGroup
Else - Actions
Set VS_Levels = (Load (Key Levels) of VS_Key from VS_Hash)
Set VS_FreezeLife = (Load (Key Life) of VS_Key from VS_Hash)
Set VS_PulledTravelled = (Load (Key Travelled) of VS_Key from VS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_PulledTravelled Less than VS_Radius
Then - Actions
Set VS_TargetLoc = (Position of VS_TempCenter)
Set VS_PullAngle = (Angle from VS_Loc to VS_TargetLoc)
Custom script: call RemoveLocation(udg_VS_TargetLoc)
Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_U)
Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_U)
Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_U) + 75
Custom script: call SetUnitX(udg_VS_U,udg_VS_X[1] + udg_VS_PullSpeed * Cos(udg_VS_PullAngle * bj_DEGTORAD))
Custom script: call SetUnitY(udg_VS_U,udg_VS_Y[1] + udg_VS_PullSpeed * Sin(udg_VS_PullAngle * bj_DEGTORAD))
-------- --------------------------------- --------
-------- Creating Lightning --------
-------- --------------------------------- --------
Lightning - Destroy VS_Lightning
Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_TempCenter)
Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_TempCenter)
Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_TempCenter)
Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LPullCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
Lightning - Change color of VS_Lightning to (VS_LPullRed VS_LPullGreen VS_LPullRed) with 1.00 alpha
Hashtable - Save Handle OfVS_Lightning as (Key PullLoad) of VS_Key in VS_Hash
-------- --------------------------------- --------
-------- Damaging and freezing life --------
-------- --------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Percentage life of VS_U) Greater than VS_LifeBlow
Then - Actions
Set VS_TempDPS = (VS_DPSBase + (VS_DPSPerLevel x (Real(VS_Levels))))
Unit - Set life of VS_U to VS_FreezeLife
Unit - Cause VS_TempCenter to damage VS_U, dealing (VS_TempDPS x VS_Loop) damage of attack type Spells and damage type Normal
Hashtable - Save (Life of VS_U) as (Key Life) of VS_Key in VS_Hash
Else - Actions
Unit - Cause VS_TempCenter to damage VS_U, dealing 100000000.00 damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at VS_Loc using VS_SFX[3]
Special Effect - Destroy (Last created special effect)
Hashtable - Save (VS_PulledTravelled + VS_PullSpeed) as (Key Travelled) of VS_Key in VS_Hash
Else - Actions
Lightning - Destroy VS_Lightning
Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
Unit Group - Remove VS_U from VS_LoopGroup
Hashtable - Save 4 as (Key Group) of VS_Key in VS_Hash
Hashtable - Save (VS_PullAngle + 180.00) as (Key Angle) of VS_Key in VS_Hash
Hashtable - Save 0.00 as (Key Travelled) of VS_Key in VS_Hash
Hashtable - Save Handle OfVS_TempCenter as 1 of VS_Key in VS_Hash
Hashtable - Save VS_Levels as (Key Levels) of VS_Key in VS_Hash
Unit Group - Add VS_U to VS_LoopGroup
Else - Actions
-------- --------------------------------- --------
-------- ThrowGroup --------
-------- --------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_GroupID Equal to 4
Then - Actions
-------- --------------------------------- --------
-------- Load --------
-------- --------------------------------- --------
Set VS_TempCenter = (Load 1 of VS_Key in VS_Hash)
Set VS_ThrowAngle = (Load (Key Angle) of VS_Key from VS_Hash)
Set VS_ThrowTravelled = (Load (Key Travelled) of VS_Key from VS_Hash)
Set VS_Levels = (Load (Key Levels) of VS_Key from VS_Hash)
Set VS_Lightning = (Load (Key PullLoad) of VS_Key in VS_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
VS_ThrowTravelled Less than VS_Radius
Then - Actions
-------- --------------------------------- --------
-------- Moving --------
-------- --------------------------------- --------
Set VS_Offset = (VS_Loc offset by VS_ThrowSpeed towards VS_ThrowAngle degrees)
Unit - Move VS_U instantly to VS_Offset
Custom script: call RemoveLocation(udg_VS_Offset)
-------- --------------------------------- --------
-------- Applying Height --------
-------- --------------------------------- --------
Set VS_Arc = (((4.00 x VS_ArcThrowHeightBase) / VS_Radius) x (((VS_ThrowTravelled + VS_ThrowSpeed) / VS_Radius) x (VS_Radius - (VS_ThrowTravelled + VS_ThrowSpeed))))
Unit - Add Crow Form to VS_U
Animation - Change VS_U flying height to VS_Arc at 0.00
Unit - Remove Crow Form from VS_U
-------- --------------------------------- --------
-------- Creating Lightning --------
-------- --------------------------------- --------
Lightning - Destroy VS_Lightning
Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_U)
Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_U)
Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_U) + 75
Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_TempCenter)
Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_TempCenter)
Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_TempCenter)
Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LPullCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
Lightning - Change color of VS_Lightning to (VS_LPullRed VS_LPullGreen VS_LPullRed) with 1.00 alpha
Hashtable - Save Handle OfVS_Lightning as (Key PullLoad) of VS_Key in VS_Hash
Hashtable - Save (VS_ThrowTravelled + VS_ThrowSpeed) as (Key Travelled) of VS_Key in VS_Hash
Else - Actions
Lightning - Destroy VS_Lightning
Special Effect - Create a special effect at VS_Loc using VS_SFX[4]
Special Effect - Destroy (Last created special effect)
Unit - Cause VS_TempCenter to damage VS_U, dealing (VS_ImpactDamageBase + (VS_DamagePerLevel x (Real(VS_Levels)))) damage of attack type Spells and damage type Normal
Animation - Change VS_U flying height to 0.00 at 0.00
Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
Unit Group - Remove VS_U from VS_LoopGroup
Else - Actions
Custom script: call RemoveLocation(udg_VS_Loc)
Else - Actions
Trigger - Turn off (This trigger)
[/trigger]
v1.0
Released
v1.1
-Fixed some actions
v1.2
-Fixed map crash
-Removed remove unit from the game because it cause map crash
v1.3
-Now removes dummy units
-Prevented map crash when removing dummies
-Added a boolean to prevent lightning not to be destroyed
-Recoded
v1.4
-Fixed undestroyed lightning
Contents

Void Sphere v1.3 (Map)

Reviews
05:29, 20th Oct 2012 Magtheridon96: Approved. There's a safer way to kill the unit though. Try setting the life to a very low amount, and deal a billion damage. I'm developing a system that guarantees the death of a unit, but it's not perfect...

Moderator

M

Moderator

05:29, 20th Oct 2012
Magtheridon96: Approved.

There's a safer way to kill the unit though.
Try setting the life to a very low amount, and deal a billion damage.
I'm developing a system that guarantees the death of a unit, but it's not perfect just yet.

Also, you don't need to use arrays for the coordinate caching, you can use regular variables.
 
~Reserved
This spells has heavy configuration and a very,very long code,so dont be confused :D
I might say im tired of cacheing those non-cached things
Sorry mag,i cannot clean the units because of the crash or error
Did you know? that the spell will look more epic when you use thin lightnings like magic leash :D
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
taking damage over time and freezing its health
Lazy to check the code, tell me how you freeze unit's HP.

Did you saved them (Unit's HP) initially at the spell cast ?

If you remove the units while the lightnings still exist, you're probably going to get errors.
Can't we somehow if we use GetUnitX() and if it returns null == unit does not exist any more ?
Since Lightning parameter requires real, not unit, therefore if unit does not exist, how can it cause error to the map ?

NOTE: I don't test the spell yet.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
very nice spells, love it. really fine combination of special effects.

freezing its health

i couldn't see the unit's health being frozen.

If a unit reaches the center, ALL unit will be thrown outward the sphere

once a unit thrown outward, the unit that is on the center will be waiting for other unit to reach the center and get thrown.

after units got thrown, the unit didn't get pulled anymore. i saw units flying as well as dead bodies. :ogre_hurrhurr:

If a unit's life drops to 10%,the unit will explode to death

didn't happen on the map test.

vote for approval + rep :thumbs_up:
 
Freezing life
first i set the life of the affected unit then damaging it then saving the life so that i can maintain the life :D
Ex.
Save the life
Load saved life
apply life
damage unit
Save the life again
[trigger=]
Set VS_TempDPS = (VS_DPSBase + (VS_DPSPerLevel x (Real(VS_Levels))))
Unit - Set life of VS_U to VS_FreezeLife
Unit - Cause VS_TempCenter to damage VS_U, dealing (VS_TempDPS x VS_Loop) damage of attack type Spells and damage type Normal
Hashtable - Save (Life of VS_U) as (Key Life) of VS_Key in VS_Hash[/trigger]
very nice spells, love it. really fine combination of special effects.



i couldn't see the unit's health being frozen.



once a unit thrown outward, the unit that is on the center will be waiting for other unit to reach the center and get thrown.

after units got thrown, the unit didn't get pulled anymore. i saw units flying as well as dead bodies. :ogre_hurrhurr:



didn't happen on the map test.

vote for approval + rep :thumbs_up:

not seen freezing,that because of the dps.

they didnt get pulled anymore because it is outside the pulling range also their movement increases the speed of the throw.

the explode wont happen,use some large hps and stuff

How does it crash the map?

... Wait a minute, I think I know what's wrong.
If you remove the units while the lightnings still exist, you're probably going to get errors.


So that's why,ill fix it on wednesday.
BUTwhen i first tested the spell,i destroyed first the lightnings before removing it,then it crashes

Also, i demand my rep NOW! :D
 
Still need to remember to post your triggers, should be a rule by now, Anyway here they are for the rest of us:


  • VS Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_VS_Hash = InitHashtable()
      • -------- --------------------------------- --------
      • -------- CONFIGURATION --------
      • -------- --------------------------------- --------
      • Set VS_Loop = 0.03
      • Trigger - Add to VS Loop <gen> the event (Time - Every VS_Loop seconds of game time)
      • -------- --------------------------------- --------
      • -------- Determines the duration --------
      • -------- --------------------------------- --------
      • Set VS_DurationBase = 3.00
      • Set VS_DurationPerLevel = 3.00
      • -------- --------------------------------- --------
      • -------- Determines the dps(damage per second) --------
      • -------- --------------------------------- --------
      • Set VS_DPSBase = 5.00
      • Set VS_DPSPerLevel = 5.00
      • -------- --------------------------------- --------
      • -------- Determines the impact damage --------
      • -------- --------------------------------- --------
      • Set VS_ImpactDamageBase = 50.00
      • Set VS_DamagePerLevel = 50.00
      • -------- --------------------------------- --------
      • -------- Determines the life drop explosion --------
      • -------- --------------------------------- --------
      • Set VS_LifeBlow = 10.00
      • -------- --------------------------------- --------
      • -------- Determines the Radius,layer thickness,segment per layer,layer number --------
      • -------- --------------------------------- --------
      • Set VS_Radius = 600.00
      • Set VS_LayerThickness = 50.00
      • Set VS_LayerNumber = ((Integer(VS_Radius)) / (Integer(VS_LayerThickness)))
      • Set VS_LayerSegment = VS_LayerNumber
      • -------- --------------------------------- --------
      • -------- Determines the lightning effects for the sphere --------
      • -------- --------------------------------- --------
      • Set VS_LSphereCode = CLPB
      • Set VS_LSphereBlue = 1.00
      • Set VS_LSphereGreen = 0.00
      • Set VS_LSphereRed = 1.00
      • -------- --------------------------------- --------
      • -------- Determines the lightning effects for the unit pulled --------
      • -------- --------------------------------- --------
      • Set VS_LPullCode = CLPB
      • Set VS_LPullBlue = 1.00
      • Set VS_LPullGreen = 0.00
      • Set VS_LPullRed = 1.00
      • -------- --------------------------------- --------
      • -------- Determines the pulling speed --------
      • -------- --------------------------------- --------
      • Set VS_PullSpeed = (300.00 x VS_Loop)
      • -------- --------------------------------- --------
      • -------- Determines the throwing speed --------
      • -------- --------------------------------- --------
      • Set VS_ThrowSpeed = (300.00 x VS_Loop)
      • -------- --------------------------------- --------
      • -------- Determines the height of the throw arc --------
      • -------- --------------------------------- --------
      • Set VS_ArcThrowHeightBase = 600.00
      • -------- --------------------------------- --------
      • -------- Determines the segment outward speed --------
      • -------- --------------------------------- --------
      • Set VS_ArcSpeed = (300.00 x VS_Loop)
      • -------- --------------------------------- --------
      • -------- Determines the height of the arc segment --------
      • -------- --------------------------------- --------
      • Set VS_ArcSphereHeightBase = 600.00
      • -------- --------------------------------- --------
      • -------- Determines the delay of the segment release --------
      • -------- --------------------------------- --------
      • Set VS_SegmentDelay = 0.30
      • -------- --------------------------------- --------
      • -------- Determines the model of the center --------
      • -------- --------------------------------- --------
      • Set VS_SFX[1] = Abilities\Spells\Undead\Possession\PossessionCaster.mdl
      • -------- --------------------------------- --------
      • -------- Determines the scale of the center --------
      • -------- --------------------------------- --------
      • Set VS_CenterScale = 500.00
      • -------- --------------------------------- --------
      • -------- Determines the model of the segment --------
      • -------- --------------------------------- --------
      • Set VS_SFX[2] = Abilities\Spells\Undead\Possession\PossessionTarget.mdl
      • -------- --------------------------------- --------
      • -------- Determines the scale of the center --------
      • -------- --------------------------------- --------
      • Set VS_SegmentScale = 100.00
      • -------- --------------------------------- --------
      • -------- Determines the sfx when a unit explodes --------
      • -------- --------------------------------- --------
      • Set VS_SFX[3] = Abilities\Spells\Undead\DarkRitual\DarkRitualCaster.mdl
      • -------- --------------------------------- --------
      • -------- Determines the sfx when a unit impacts --------
      • -------- --------------------------------- --------
      • Set VS_SFX[4] = Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • -------- --------------------------------- --------
      • -------- Determines the sfx when a segment drops --------
      • -------- --------------------------------- --------
      • Set VS_SFX[5] = Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
  • VS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Void Sphere
    • Actions
      • -------- --------------------------------- --------
      • -------- Variables --------
      • -------- --------------------------------- --------
      • Set VS_Caster = (Triggering unit)
      • Set VS_Owner = (Triggering player)
      • Set VS_TargetLoc = (Target point of ability being cast)
      • Set VS_Levels = (Level of Void Sphere for VS_Caster)
      • -------- --------------------------------- --------
      • -------- Creating Center --------
      • -------- --------------------------------- --------
      • Unit - Create 1 Dummy for VS_Owner at VS_TargetLoc facing Default building facing degrees
      • Set VS_Center = (Last created unit)
      • Custom script: set udg_VS_CenterKey = GetHandleId(udg_VS_Center)
      • -------- --------------------------------- --------
      • -------- Adding Duration --------
      • -------- --------------------------------- --------
      • Unit - Add a (VS_DurationBase + (VS_DurationPerLevel x (Real(VS_Levels)))) second Generic expiration timer to VS_Center
      • -------- --------------------------------- --------
      • -------- Adding Model then scale --------
      • -------- --------------------------------- --------
      • Special Effect - Create a special effect attached to the chest of VS_Center using VS_SFX[1]
      • Hashtable - Save Handle Of(Last created special effect) as (Key Model) of VS_CenterKey in VS_Hash
      • Animation - Change VS_Center's size to (VS_CenterScale%, 0.00%, 0.00%) of its original size
      • -------- --------------------------------- --------
      • -------- Saving --------
      • -------- --------------------------------- --------
      • Hashtable - Save Handle OfVS_Owner as (Key Owner) of VS_CenterKey in VS_Hash
      • Hashtable - Save VS_Levels as (Key Levels) of VS_CenterKey in VS_Hash
      • Hashtable - Save 1 as (Key Group) of VS_CenterKey in VS_Hash
      • Unit Group - Add VS_Center to VS_LoopGroup
      • Trigger - Turn on VS Loop <gen>
      • Custom script: call RemoveLocation(udg_VS_TargetLoc)
  • VS Loop
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (VS_LoopGroup is empty) Equal to False
        • Then - Actions
          • Unit Group - Pick every unit in VS_LoopGroup and do (Actions)
            • Loop - Actions
              • Set VS_U = (Picked unit)
              • Custom script: set udg_VS_Key = GetHandleId(udg_VS_U)
              • Set VS_GroupID = (Load (Key Group) of VS_Key from VS_Hash)
              • -------- --------------------------------- --------
              • -------- Starting Loop --------
              • -------- --------------------------------- --------
              • -------- --------------------------------- --------
              • -------- CenterGroup --------
              • -------- --------------------------------- --------
              • Set VS_Loc = (Position of VS_U)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VS_GroupID Equal to 1
                • Then - Actions
                  • -------- --------------------------------- --------
                  • -------- Load --------
                  • -------- --------------------------------- --------
                  • Set VS_Owner = (Load (Key Owner) of VS_Key in VS_Hash)
                  • Set VS_Levels = (Load (Key Levels) of VS_Key from VS_Hash)
                  • Set VS_TempDelay = (Load (Key Delay) of VS_Key from VS_Hash)
                  • -------- --------------------------------- --------
                  • -------- Check if CurrentTime hasnt reached max time --------
                  • -------- --------------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (VS_U is alive) Equal to True
                    • Then - Actions
                      • -------- --------------------------------- --------
                      • -------- Check if delay has reached its max time --------
                      • -------- --------------------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • VS_TempDelay Greater than VS_SegmentDelay
                        • Then - Actions
                          • -------- --------------------------------- --------
                          • -------- Creating Segment --------
                          • -------- --------------------------------- --------
                          • For each (Integer VS_Integer) from 1 to VS_LayerSegment, do (Actions)
                            • Loop - Actions
                              • Set VS_SegmentDegrees = ((Real(VS_Integer)) x (360.00 / (Real(VS_LayerSegment))))
                              • Unit - Create 1 Dummy for VS_Owner at VS_Loc facing VS_SegmentDegrees degrees
                              • Set VS_Segment = (Last created unit)
                              • Custom script: set udg_VS_SegmentKey = GetHandleId(udg_VS_Segment)
                              • Special Effect - Create a special effect attached to the chest of VS_Segment using VS_SFX[2]
                              • Hashtable - Save Handle Of(Last created special effect) as (Key Model) of VS_SegmentKey in VS_Hash
                              • Animation - Change VS_Segment's size to (VS_SegmentScale%, 0.00%, 0.00%) of its original size
                              • -------- --------------------------------- --------
                              • -------- Attaching the lightning to the first(to this loop)segment,but first check --------
                              • -------- --------------------------------- --------
                              • Set VS_LoadSegment = (Load VS_Integer of VS_Key in VS_Hash)
                              • -------- --------------------------------- --------
                              • -------- Getting Coordinates --------
                              • -------- --------------------------------- --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • VS_LoadSegment Not equal to No unit
                                • Then - Actions
                                  • Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_Segment)
                                  • Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_Segment)
                                  • Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_Segment)
                                  • Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_LoadSegment)
                                  • Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_LoadSegment)
                                  • Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_LoadSegment)
                                  • Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LSphereCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
                                  • Lightning - Change color of VS_Lightning to (VS_LSphereRed VS_LSphereGreen VS_LSphereBlue) with 1.00 alpha
                                  • Hashtable - Save Handle OfVS_Lightning as (Key SphereLoad) of VS_SegmentKey in VS_Hash
                                  • Hashtable - Save Handle OfVS_LoadSegment as 1 of VS_SegmentKey in VS_Hash
                                • Else - Actions
                              • Hashtable - Save Handle OfVS_Segment as VS_Integer of VS_Key in VS_Hash
                          • For each (Integer VS_Integer) from 1 to VS_LayerSegment, do (Actions)
                            • Loop - Actions
                              • Set VS_Segment = (Load VS_Integer of VS_Key in VS_Hash)
                              • Custom script: set udg_VS_SegmentKey = GetHandleId(udg_VS_Segment)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • VS_Integer Equal to VS_LayerSegment
                                • Then - Actions
                                  • Set VS_LoadSegment = (Load 1 of VS_Key in VS_Hash)
                                • Else - Actions
                                  • Set VS_LoadSegment = (Load (VS_Integer + 1) of VS_Key in VS_Hash)
                              • Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_Segment)
                              • Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_Segment)
                              • Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_Segment)
                              • Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_LoadSegment)
                              • Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_LoadSegment)
                              • Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_LoadSegment)
                              • Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LSphereCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
                              • Lightning - Change color of VS_Lightning to (VS_LSphereRed VS_LSphereGreen VS_LSphereBlue) with 1.00 alpha
                              • Hashtable - Save Handle OfVS_Lightning as (Key SphereLoadLayer) of VS_SegmentKey in VS_Hash
                              • Hashtable - Save Handle OfVS_LoadSegment as 2 of VS_SegmentKey in VS_Hash
                              • Set VS_SegmentTravelled = 0.00
                              • Hashtable - Save VS_SegmentTravelled as (Key Travelled) of VS_SegmentKey in VS_Hash
                              • Hashtable - Save 2 as (Key Group) of VS_SegmentKey in VS_Hash
                              • Unit Group - Add VS_Segment to VS_LoopGroup
                          • Set VS_TempDelay = 0.00
                          • Hashtable - Save VS_TempDelay as (Key Delay) of VS_Key in VS_Hash
                        • Else - Actions
                          • Hashtable - Save (VS_TempDelay + VS_Loop) as (Key Delay) of VS_Key in VS_Hash
                      • -------- --------------------------------- --------
                      • -------- Picking Units --------
                      • -------- --------------------------------- --------
                      • Set VS_TempGroup = (Units within VS_Radius of VS_Loc)
                      • Unit Group - Pick every unit in VS_TempGroup and do (Actions)
                        • Loop - Actions
                          • Set VS_Picked = (Picked unit)
                          • Custom script: set udg_VS_PickedKey = GetHandleId(udg_VS_Picked)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • And - All (Conditions) are true
                                • Conditions
                                  • (VS_Picked is A structure) Equal to False
                                  • (VS_Picked is Magic Immune) Equal to False
                                  • (VS_Picked is alive) Equal to True
                                  • (VS_Picked belongs to an enemy of VS_Owner) Equal to True
                                  • (VS_Picked is in VS_LoopGroup) Equal to False
                            • Then - Actions
                              • Hashtable - Save 3 as (Key Group) of VS_PickedKey in VS_Hash
                              • Hashtable - Save Handle OfVS_U as 1 of VS_PickedKey in VS_Hash
                              • Hashtable - Save VS_Levels as (Key Levels) of VS_PickedKey in VS_Hash
                              • Hashtable - Save (Life of VS_Picked) as (Key Life) of VS_PickedKey in VS_Hash
                              • Unit Group - Add VS_Picked to VS_LoopGroup
                            • Else - Actions
                      • Custom script: call DestroyGroup(udg_VS_TempGroup)
                      • Hashtable - Save (VS_TempDelay + VS_Loop) as (Key Delay) of VS_Key in VS_Hash
                    • Else - Actions
                      • Set VS_DestroySFX = (Load (Key Model) of VS_Key in VS_Hash)
                      • Special Effect - Destroy VS_DestroySFX
                      • Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
                      • Unit Group - Remove VS_U from VS_LoopGroup
                • Else - Actions
              • -------- --------------------------------- --------
              • -------- SegmentGroup --------
              • -------- --------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VS_GroupID Equal to 2
                • Then - Actions
                  • -------- --------------------------------- --------
                  • -------- Load --------
                  • -------- --------------------------------- --------
                  • Set VS_SegmentTravelled = (Load (Key Travelled) of VS_Key from VS_Hash)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • VS_SegmentTravelled Less than VS_Radius
                    • Then - Actions
                      • -------- --------------------------------- --------
                      • -------- Moving --------
                      • -------- --------------------------------- --------
                      • Set VS_Offset = (VS_Loc offset by VS_ArcSpeed towards (Facing of VS_U) degrees)
                      • Unit - Move VS_U instantly to VS_Offset
                      • Custom script: call RemoveLocation(udg_VS_Offset)
                      • -------- --------------------------------- --------
                      • -------- Applying Height --------
                      • -------- --------------------------------- --------
                      • Set VS_Arc = (((4.00 x VS_ArcSphereHeightBase) / VS_Radius) x (((VS_SegmentTravelled + VS_ArcSpeed) / VS_Radius) x (VS_Radius - (VS_SegmentTravelled + VS_ArcSpeed))))
                      • Animation - Change VS_U flying height to VS_Arc at 0.00
                      • -------- --------------------------------- --------
                      • -------- Coordinates X and Y --------
                      • -------- --------------------------------- --------
                      • Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_U)
                      • Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_U)
                      • Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_U) + 50
                      • -------- --------------------------------- --------
                      • -------- First --------
                      • -------- --------------------------------- --------
                      • Set VS_LoadSegment = (Load 1 of VS_Key in VS_Hash)
                      • Set VS_Lightning = (Load (Key SphereLoad) of VS_Key in VS_Hash)
                      • Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_LoadSegment)
                      • Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_LoadSegment)
                      • Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_LoadSegment) + 50
                      • Custom script: call MoveLightningEx(udg_VS_Lightning,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • VS_LoadSegment Equal to No unit
                        • Then - Actions
                          • Lightning - Destroy VS_Lightning
                        • Else - Actions
                      • -------- --------------------------------- --------
                      • -------- First --------
                      • -------- --------------------------------- --------
                      • Set VS_LoadSegment = (Load 2 of VS_Key in VS_Hash)
                      • Set VS_Lightning = (Load (Key SphereLoadLayer) of VS_Key in VS_Hash)
                      • Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_LoadSegment)
                      • Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_LoadSegment)
                      • Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_LoadSegment) + 50
                      • Custom script: call MoveLightningEx(udg_VS_Lightning,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
                      • -------- --------------------------------- --------
                      • -------- Saving --------
                      • -------- --------------------------------- --------
                      • Hashtable - Save (VS_SegmentTravelled + VS_ArcSpeed) as (Key Travelled) of VS_Key in VS_Hash
                    • Else - Actions
                      • Set VS_Lightning = (Load (Key SphereLoadLayer) of VS_Key in VS_Hash)
                      • Lightning - Destroy VS_Lightning
                      • Set VS_Lightning = (Load (Key SphereLoad) of VS_Key in VS_Hash)
                      • Lightning - Destroy VS_Lightning
                      • Special Effect - Create a special effect at VS_Loc using VS_SFX[5]
                      • Special Effect - Destroy (Last created special effect)
                      • Set VS_DestroySFX = (Load (Key Model) of VS_Key in VS_Hash)
                      • Special Effect - Destroy VS_DestroySFX
                      • Unit - Kill VS_U
                      • Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
                      • Unit Group - Remove VS_U from VS_LoopGroup
                • Else - Actions
              • -------- --------------------------------- --------
              • -------- PullGroup --------
              • -------- --------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VS_GroupID Equal to 3
                • Then - Actions
                  • -------- --------------------------------- --------
                  • -------- Load --------
                  • -------- --------------------------------- --------
                  • Set VS_TempCenter = (Load 1 of VS_Key in VS_Hash)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • VS_TempCenter Equal to No unit
                    • Then - Actions
                      • Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
                      • Unit Group - Remove VS_U from VS_LoopGroup
                    • Else - Actions
                      • Set VS_Levels = (Load (Key Levels) of VS_Key from VS_Hash)
                      • Set VS_Lightning = (Load (Key PullLoad) of VS_Key in VS_Hash)
                      • Set VS_FreezeLife = (Load (Key Life) of VS_Key from VS_Hash)
                      • Set VS_PulledTravelled = (Load (Key Travelled) of VS_Key from VS_Hash)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • VS_PulledTravelled Less than VS_Radius
                        • Then - Actions
                          • Set VS_TargetLoc = (Position of VS_TempCenter)
                          • Set VS_PullAngle = (Angle from VS_Loc to VS_TargetLoc)
                          • Custom script: call RemoveLocation(udg_VS_TargetLoc)
                          • Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_U)
                          • Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_U)
                          • Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_U) + 75
                          • Custom script: call SetUnitX(udg_VS_U,udg_VS_X[1] + udg_VS_PullSpeed * Cos(udg_VS_PullAngle * bj_DEGTORAD))
                          • Custom script: call SetUnitY(udg_VS_U,udg_VS_Y[1] + udg_VS_PullSpeed * Sin(udg_VS_PullAngle * bj_DEGTORAD))
                          • -------- --------------------------------- --------
                          • -------- Creating Lightning --------
                          • -------- --------------------------------- --------
                          • Lightning - Destroy VS_Lightning
                          • Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_TempCenter)
                          • Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_TempCenter)
                          • Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_TempCenter)
                          • Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LPullCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
                          • Lightning - Change color of VS_Lightning to (VS_LPullRed VS_LPullGreen VS_LPullRed) with 1.00 alpha
                          • Hashtable - Save Handle OfVS_Lightning as (Key PullLoad) of VS_Key in VS_Hash
                          • -------- --------------------------------- --------
                          • -------- Damaging and freezing life --------
                          • -------- --------------------------------- --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Percentage life of VS_U) Greater than VS_LifeBlow
                            • Then - Actions
                              • Set VS_TempDPS = (VS_DPSBase + (VS_DPSPerLevel x (Real(VS_Levels))))
                              • Unit - Set life of VS_U to VS_FreezeLife
                              • Unit - Cause VS_TempCenter to damage VS_U, dealing (VS_TempDPS x VS_Loop) damage of attack type Spells and damage type Normal
                              • Hashtable - Save (Life of VS_U) as (Key Life) of VS_Key in VS_Hash
                            • Else - Actions
                              • Unit - Cause VS_TempCenter to damage VS_U, dealing 100000000.00 damage of attack type Spells and damage type Normal
                              • Special Effect - Create a special effect at VS_Loc using VS_SFX[3]
                              • Special Effect - Destroy (Last created special effect)
                          • Hashtable - Save (VS_PulledTravelled + VS_PullSpeed) as (Key Travelled) of VS_Key in VS_Hash
                        • Else - Actions
                          • Set VS_Lightning = (Load (Key PullLoad) of VS_Key in VS_Hash)
                          • Lightning - Destroy VS_Lightning
                          • Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
                          • Unit Group - Remove VS_U from VS_LoopGroup
                          • Hashtable - Save 4 as (Key Group) of VS_Key in VS_Hash
                          • Hashtable - Save (VS_PullAngle + 180.00) as (Key Angle) of VS_Key in VS_Hash
                          • Hashtable - Save 0.00 as (Key Travelled) of VS_Key in VS_Hash
                          • Hashtable - Save Handle OfVS_TempCenter as 1 of VS_Key in VS_Hash
                          • Hashtable - Save VS_Levels as (Key Levels) of VS_Key in VS_Hash
                          • Unit Group - Add VS_U to VS_LoopGroup
                • Else - Actions
              • -------- --------------------------------- --------
              • -------- ThrowGroup --------
              • -------- --------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • VS_GroupID Equal to 4
                • Then - Actions
                  • -------- --------------------------------- --------
                  • -------- Load --------
                  • -------- --------------------------------- --------
                  • Set VS_TempCenter = (Load 1 of VS_Key in VS_Hash)
                  • Set VS_ThrowAngle = (Load (Key Angle) of VS_Key from VS_Hash)
                  • Set VS_ThrowTravelled = (Load (Key Travelled) of VS_Key from VS_Hash)
                  • Set VS_Levels = (Load (Key Levels) of VS_Key from VS_Hash)
                  • Set VS_Lightning = (Load (Key PullLoad) of VS_Key in VS_Hash)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • VS_ThrowTravelled Less than VS_Radius
                    • Then - Actions
                      • -------- --------------------------------- --------
                      • -------- Moving --------
                      • -------- --------------------------------- --------
                      • Set VS_Offset = (VS_Loc offset by VS_ThrowSpeed towards VS_ThrowAngle degrees)
                      • Unit - Move VS_U instantly to VS_Offset
                      • Custom script: call RemoveLocation(udg_VS_Offset)
                      • -------- --------------------------------- --------
                      • -------- Applying Height --------
                      • -------- --------------------------------- --------
                      • Set VS_Arc = (((4.00 x VS_ArcThrowHeightBase) / VS_Radius) x (((VS_ThrowTravelled + VS_ThrowSpeed) / VS_Radius) x (VS_Radius - (VS_ThrowTravelled + VS_ThrowSpeed))))
                      • Unit - Add Crow Form to VS_U
                      • Animation - Change VS_U flying height to VS_Arc at 0.00
                      • Unit - Remove Crow Form from VS_U
                      • -------- --------------------------------- --------
                      • -------- Creating Lightning --------
                      • -------- --------------------------------- --------
                      • Lightning - Destroy VS_Lightning
                      • Custom script: set udg_VS_X[1] = GetUnitX(udg_VS_U)
                      • Custom script: set udg_VS_Y[1] = GetUnitY(udg_VS_U)
                      • Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_U) + 75
                      • Custom script: set udg_VS_X[2] = GetUnitX(udg_VS_TempCenter)
                      • Custom script: set udg_VS_Y[2] = GetUnitY(udg_VS_TempCenter)
                      • Custom script: set udg_VS_Z[2] = GetUnitFlyHeight(udg_VS_TempCenter)
                      • Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LPullCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
                      • Lightning - Change color of VS_Lightning to (VS_LPullRed VS_LPullGreen VS_LPullRed) with 1.00 alpha
                      • Hashtable - Save Handle OfVS_Lightning as (Key PullLoad) of VS_Key in VS_Hash
                      • Hashtable - Save (VS_ThrowTravelled + VS_ThrowSpeed) as (Key Travelled) of VS_Key in VS_Hash
                    • Else - Actions
                      • Lightning - Destroy VS_Lightning
                      • Special Effect - Create a special effect at VS_Loc using VS_SFX[4]
                      • Special Effect - Destroy (Last created special effect)
                      • Unit - Cause VS_TempCenter to damage VS_U, dealing (VS_ImpactDamageBase + (VS_DamagePerLevel x (Real(VS_Levels)))) damage of attack type Spells and damage type Normal
                      • Animation - Change VS_U flying height to 0.00 at 0.00
                      • Hashtable - Clear all child hashtables of child VS_Key in VS_Hash
                      • Unit Group - Remove VS_U from VS_LoopGroup
                • Else - Actions
              • Custom script: call RemoveLocation(udg_VS_Loc)
        • Else - Actions
          • Trigger - Turn off (This trigger)


Looks amazingly similar to my Choas Portal, which is interesting I guess? due to the similar functionality and effects.
Eitherway a few notes:

- Far too much SFX, generates heavy lag and blocks out the screen almost completely
- The throwing out of the units is mathematically incorrect and it just simply doesn't look right
- Units which have died while being pulled will still be thrown
- There's an SFX spam-error thing I get occasionally which is a sort of green in the centre of the Sphere, I'd look into it
- Has very few levelled attributes or even potential configuration for levelled attributes, I would consider adding a lot more of those, since it can be done for almost everything.

  • Unit - Cause VS_TempCenter to damage VS_U, dealing 100000000.00 damage of attack type Spells and damage type Normal
- You could just get it to deal 11% of the unit's health as damage and it won't look quite so rediculous, and make it chaos damage

  • Set VS_TempDPS = (VS_DPSBase + (VS_DPSPerLevel x (Real(VS_Levels))))
- If you're going to constantly call the same calculation using things which do not change, save the value of what it's changed to beforehand

  • Custom script: set udg_VS_Lightning = AddLightningEx(udg_VS_LPullCode,true,udg_VS_X[1],udg_VS_Y[1],udg_VS_Z[1],udg_VS_X[2],udg_VS_Y[2],udg_VS_Z[2])
- Use MoveLightningEx not AddLightningEx, it'll reduce lag

  • Unit - Move VS_U instantly to VS_Offset
- If you know how to use coordinates for the Z height, why not do the same for X and Y and save us all a lot of lag problems

  • -------- First --------
- You repeat this comment

  • (Percentage life of VS_U) Greater than VS_LifeBlow
- Why exactly? I mean from what I've seen there's nothing causing life to get frozen? I mean it'll just keep saving the value of their current life until it becomes too low and then they die anyway? I don't really get it. Even though you explain it why not just damage the unit? I mean this loop runs every 0.03 seconds, I doubt it's really going to have much effect, I suppose it's stops other things damaging it while it's going through this proccees, but that's not really freezing health as you suggest, and is fairly redundant and simply why is what I want to know.

  • Set VS_Lightning = (Load (Key SphereLoadLayer) of VS_Key in VS_Hash)
  • Lightning - Destroy VS_Lightning
- Why cache it if you're only referrencing it once?

  • Custom script: set udg_VS_Z[1] = GetUnitFlyHeight(udg_VS_U) + 75
- You should account for terrain height as well when doing these things or you'll end up with slightly off positioned things particularly with lightning effects

Overview: Really needs quite the makeover, got inefficiencies everywhere and some thing which really don't make much sense, I'd suggest working through your code and changing things for this to all those parts which apply, for now the best I could give would be 3/5 since it may look pretty, but it lags like hell on regular machines, and has a lot of holes in it and a 3 might be being generous.

I would also suggest to never make a part of a spell which serves purely aesthetic purposes if it can be avoided in almost any situation. Especially when it generates so many issues
 
Top