• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Split Earth v1.2

  • Like
Reactions: deepstrasz
Description:
=====================================================================
The Caster blows the earth with massive force,creating a huge fissure which travels towards the targeted point.After 1 second,the part of the fissure explodes,stunning enemy units within 500 radius around it and releasing fragments of lava scattered around fissure which deals damage.
|cffffcc00Level 1|r - 2000 range,stuns for 2 seconds,releases 6 fragments per spot,deals 10 damage per fragment.
|cffffcc00Level 2|r - 2500 range,stuns for 2.5 seconds,releases 8 fragments per spot,deals 17.5 damage per fragment.
|cffffcc00Level 3|r - 3000 range,stuns for 3 seconds,releases 10 fragments per spot,deals 25 damage per fragment.
=====================================================================
Triggers
=====================================================================
[trigger=Init]SE SetUp
Events
Map initialization
Conditions
Actions
Custom script: set udg_SE_Hash = InitHashtable()
-------- Configuration --------
-------- Determines the damage --------
Set SE_Damage[1] = 10.00
Set SE_Damage[2] = 17.50
Set SE_Damage[3] = 25.00
-------- Determines the speed of the fissure --------
Set SE_FissureSpeed[1] = 6250.00
Set SE_FissureSpeed[2] = (SE_FissureSpeed[1] x 0.03)
-------- Determines the speed of the fragments --------
Set SE_FragmentSpeed[1] = 125.00
Set SE_FragmentSpeed[2] = (SE_FragmentSpeed[1] x 0.03)
-------- Determines the AoE of the fissure --------
-------- For every spot --------
Set SE_Radius = 500.00
-------- Determines the max distance the fissure can go --------
Set SE_FissureMaxDistance[1] = 0.32
Set SE_FissureMaxDistance[2] = 0.40
Set SE_FissureMaxDistance[3] = 0.48
-------- Determines the number of fragments --------
Set SE_FragmentNumber[1] = 6
Set SE_FragmentNumber[2] = 8
Set SE_FragmentNumber[3] = 10
-------- Determines the height of the fragments when scattered(by means of the arc) --------
Set SE_Height = 1.50
-------- Determines the explosion delay of the fissure --------
Set SE_ExplosionDelay = 1.00
-------- Determines the duration of the stun --------
Set SE_StunDuration[1] = 2.00
Set SE_StunDuration[2] = 2.50
Set SE_StunDuration[3] = 3.00
-------- Determines the damage radius --------
Set SE_FragmentRadius = 100.00
-------- Determines the stun radius --------
Set SE_StunRadius = 250.00
-------- Determines the radius of destroying trees --------
Set SE_TreeRadiusDestroy = 300.00
-------- SFX --------
-------- Determines the sfx when the fissure explodes --------
Set SE_SFX[1] = Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
-------- Determines the sfx when the fissure travels --------
Set SE_SFX[2] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-------- Determines the SFX when the fragments explodes --------
Set SE_SFX[3] = Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
-------- --------------------------------------------------------------------- --------
-------- Dont Touch Anything Below --------
-------- --------------------------------------------------------------------- --------
Set SE_DummyLocationSys = (Center of (Playable map area))
-------- Creating Tree Cutter --------
Unit - Create 1 Peasant for Neutral Passive at SE_DummyLocationSys facing Default building facing degrees
Set SE_TreeCutter = (Last created unit)
-------- Determines the order --------
Set SE_DestroyOrder = harvest
Unit - Hide SE_TreeCutter
Unit - Make SE_TreeCutter Invulnerable
-------- Creating Stunner --------
Unit - Create 1 SE Dummy for Neutral Passive at SE_DummyLocationSys facing Default building facing degrees
Set SE_Stunner = (Last created unit)
-------- Determines the order --------
Set SE_StunOrder = thunderbolt
-------- Determines the ability --------
Set SE_StunAbility = Stun
-------- Determines the buff --------
Set SE_StunBuff = Stunned (Pause)
Unit - Add SE_StunAbility to SE_Stunner
Custom script: call RemoveLocation(udg_SE_DummyLocationSys)
[/trigger][trigger=Cast]SE Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Split Earth
Actions
-------- Variables --------
Set SE_Caster = (Triggering unit)
Set SE_Owner = (Triggering player)
Set SE_Levels = (Level of Split Earth for SE_Caster)
-------- Creating Fissure Creator --------
Set SE_CasterLoc = (Position of SE_Caster)
Unit - Create 1 SE Dummy for SE_Owner at SE_CasterLoc facing SE_CasterLoc
Set SE_FissureCreator = (Last created unit)
Custom script: set udg_SE_CreatorKey = GetHandleId(udg_SE_FissureCreator)
-------- Adding Duration --------
Unit - Add a SE_FissureMaxDistance[SE_Levels] second Generic expiration timer to SE_FissureCreator
-------- Variables --------
Set SE_TargetLoc = (Target point of ability being cast)
Set SE_CreatorAngle = (Angle from SE_CasterLoc to SE_TargetLoc)
-------- Determines the group number where the dummy belongs --------
Set SE_GroupNumber = 1
-------- Saving --------
Hashtable - Save SE_CreatorAngle as 0 of SE_CreatorKey in SE_Hash
Hashtable - Save SE_Levels as 1 of SE_CreatorKey in SE_Hash
Hashtable - Save Handle OfSE_Owner as 2 of SE_CreatorKey in SE_Hash
Hashtable - Save SE_GroupNumber as 3 of SE_CreatorKey in SE_Hash
-------- Starting Loop --------
Unit Group - Add SE_FissureCreator to SE_LoopGroup
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SE Loop <gen> is on) Equal to False
Then - Actions
Trigger - Turn on SE Loop <gen>
Else - Actions
-------- Leaks --------
Custom script: call RemoveLocation(udg_SE_CasterLoc)
Custom script: call RemoveLocation(udg_SE_TargetLoc)
[/trigger][trigger=Loop]SE Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SE_LoopGroup is empty) Equal to False
Then - Actions
Unit Group - Pick every unit in SE_LoopGroup and do (Actions)
Loop - Actions
Set SE_U = (Picked unit)
Custom script: set udg_SE_UKey = GetHandleId(udg_SE_U)
-------- Load Group --------
Set SE_GroupNumber = (Load 3 of SE_UKey from SE_Hash)
Set SE_ULoc = (Position of SE_U)
-------- Checking Groups --------
-------- Group 1 --------
-------- Fissure Creator --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SE_GroupNumber Equal to 1
Then - Actions
-------- Loading Variables --------
Set SE_CreatorAngle = (Load 0 of SE_UKey from SE_Hash)
Set SE_Levels = (Load 1 of SE_UKey from SE_Hash)
Set SE_Owner = (Load 2 of SE_UKey in SE_Hash)
-------- Checking if the creator is alive --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SE_U is alive) Equal to True
Then - Actions
-------- Moving Unit --------
Custom script: call SetUnitX(udg_SE_U,GetUnitX(udg_SE_U) + udg_SE_FissureSpeed[2] * Cos(udg_SE_CreatorAngle * bj_DEGTORAD))
Custom script: call SetUnitY(udg_SE_U,GetUnitY(udg_SE_U) + udg_SE_FissureSpeed[2] * Sin(udg_SE_CreatorAngle * bj_DEGTORAD))
-------- Creating Fissures --------
Unit - Create 1 SE Fissure for SE_Owner at SE_ULoc facing Default building facing degrees
Set SE_Fissure = (Last created unit)
Custom script: set udg_SE_FissureKey = GetHandleId(udg_SE_Fissure)
-------- Adding delay --------
Unit - Add a SE_ExplosionDelay second Generic expiration timer to SE_Fissure
-------- Saving Variables --------
Hashtable - Save SE_Levels as 1 of SE_FissureKey in SE_Hash
Hashtable - Save Handle OfSE_Owner as 2 of SE_FissureKey in SE_Hash
Hashtable - Save 2 as 3 of SE_FissureKey in SE_Hash
-------- Adding unit --------
Unit Group - Add SE_Fissure to SE_LoopGroup
-------- Destroying Trees --------
Destructible - Pick every destructible within SE_TreeRadiusDestroy of SE_ULoc and do (Actions)
Loop - Actions
Set SE_Tree = (Picked destructible)
Custom script: call IssueTargetOrder(udg_SE_TreeCutter,udg_SE_DestroyOrder,udg_SE_Tree)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of SE_TreeCutter) Equal to (Order(SE_DestroyOrder))
Then - Actions
Destructible - Kill SE_Tree
Else - Actions
Unit - Order SE_TreeCutter to Stop
-------- SFX --------
Special Effect - Create a special effect at SE_ULoc using SE_SFX[2]
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
-------- Group 2 --------
-------- Fissure Explode --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SE_GroupNumber Equal to 2
Then - Actions
Set SE_Levels = (Load 1 of SE_UKey from SE_Hash)
Set SE_Owner = (Load 2 of SE_UKey in SE_Hash)
-------- Checking if the unit is dead --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SE_U is dead) Equal to True
Then - Actions
-------- Creating fragments --------
For each (Integer SE_Integer) from 1 to SE_FragmentNumber[SE_Levels], do (Actions)
Loop - Actions
Unit - Create 1 SE Fragments for SE_Owner at SE_ULoc facing (Random angle) degrees
Set SE_Fragment = (Last created unit)
Custom script: set udg_SE_FragmentKey = GetHandleId(udg_SE_Fragment)
-------- Getting Arcs --------
Set SE_Distance = (Random real number between 0.00 and SE_Radius)
Set SE_Arc = (SE_Distance x SE_Height)
Set SE_Travelled = 0.00
Set SE_CurrentHeight = 0.00
-------- Saving Variables --------
Hashtable - Save SE_Levels as 1 of SE_FragmentKey in SE_Hash
Hashtable - Save Handle OfSE_Owner as 2 of SE_FragmentKey in SE_Hash
Hashtable - Save 3 as 3 of SE_FragmentKey in SE_Hash
Hashtable - Save SE_Distance as 4 of SE_FragmentKey in SE_Hash
Hashtable - Save SE_Arc as 5 of SE_FragmentKey in SE_Hash
Hashtable - Save SE_Travelled as 6 of SE_FragmentKey in SE_Hash
Hashtable - Save SE_CurrentHeight as 7 of SE_FragmentKey in SE_Hash
-------- Starting Loop --------
Unit Group - Add SE_Fragment to SE_LoopGroup
-------- Stunning Units --------
Set SE_StunGroup = (Units within SE_StunRadius of SE_ULoc)
Unit Group - Pick every unit in SE_StunGroup and do (Actions)
Loop - Actions
Set SE_Stunned = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(SE_Stunned is A structure) Equal to False
(SE_Stunned is Magic Immune) Equal to False
(SE_Stunned is alive) Equal to True
(SE_Stunned belongs to an enemy of SE_Owner) Equal to True
Then - Actions
Custom script: set udg_SE_StunKey = GetHandleId(udg_SE_Stunned)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(SE_Stunned is in SE_LoopGroup) Equal to True
Then - Actions
-------- Adding Duration --------
Set SE_StunTimer = ((Load 8 of SE_StunKey from SE_Hash) + SE_StunDuration[SE_Levels])
Hashtable - Save SE_StunTimer as 8 of SE_StunKey in SE_Hash
Else - Actions
-------- Stunning Unit --------
Custom script: call IssueTargetOrder(udg_SE_Stunner,udg_SE_StunOrder,udg_SE_Stunned)
-------- Variables --------
Set SE_StunTimer = SE_StunDuration[SE_Levels]
Set SE_StunCurrent = 0.00
-------- Saving Variables --------
Hashtable - Save SE_Levels as 1 of SE_StunKey in SE_Hash
Hashtable - Save 4 as 3 of SE_StunKey in SE_Hash
Hashtable - Save SE_StunTimer as 8 of SE_StunKey in SE_Hash
Hashtable - Save SE_StunCurrent as 9 of SE_StunKey in SE_Hash
-------- Starting Loop --------
Unit Group - Add SE_Stunned to SE_LoopGroup
Else - Actions
-------- SFX --------
Special Effect - Create a special effect at SE_ULoc using SE_SFX[1]
Special Effect - Destroy (Last created special effect)
-------- Clean Leak --------
Custom script: call DestroyGroup(udg_SE_StunGroup)
Else - Actions
Else - Actions
-------- Group 3 --------
-------- Fissure Fragments --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SE_GroupNumber Equal to 3
Then - Actions
Set SE_Levels = (Load 1 of SE_UKey from SE_Hash)
Set SE_Owner = (Load 2 of SE_UKey in SE_Hash)
Set SE_Distance = (Load 4 of SE_UKey from SE_Hash)
Set SE_Arc = (Load 5 of SE_UKey from SE_Hash)
Set SE_Travelled = (Load 6 of SE_UKey from SE_Hash)
Set SE_CurrentHeight = (Load 7 of SE_UKey from SE_Hash)
-------- Checking --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SE_Travelled Less than SE_Distance
Then - Actions
-------- Moving Unit --------
Set SE_FragmentAngle = (Facing of SE_U)
Set SE_FragmentOffset = (SE_ULoc offset by SE_FragmentSpeed[2] towards SE_FragmentAngle degrees)
Unit - Move SE_U instantly to SE_FragmentOffset
-------- Changing Height --------
Hashtable - Save (SE_Travelled + SE_FragmentSpeed[2]) as 6 of SE_UKey in SE_Hash
Hashtable - Save (((4.00 x SE_Arc) / SE_Distance) x (((Load 6 of SE_UKey from SE_Hash) / SE_Distance) x (SE_Distance - (Load 6 of SE_UKey from SE_Hash)))) as 7 of SE_UKey in SE_Hash
Animation - Change SE_U flying height to (Load 7 of SE_UKey from SE_Hash) at 0.00
Custom script: call RemoveLocation(udg_SE_FragmentOffset)
Else - Actions
Unit - Remove SE_U from the game
-------- Damaging Units --------
Set SE_DamageGroup = (Units within SE_FragmentRadius of SE_ULoc)
Unit Group - Pick every unit in SE_DamageGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Picked unit) is A structure) Equal to False
((Picked unit) is Magic Immune) Equal to False
((Picked unit) is alive) Equal to True
((Picked unit) belongs to an enemy of SE_Owner) Equal to True
Then - Actions
Unit - Cause SE_U to damage (Picked unit), dealing SE_Damage[SE_Levels] damage of attack type Spells and damage type Normal
Else - Actions
-------- Destroying Trees --------
Destructible - Pick every destructible within 50.00 of SE_ULoc and do (Actions)
Loop - Actions
Set SE_Tree = (Picked destructible)
Custom script: call IssueTargetOrder(udg_SE_TreeCutter,udg_SE_DestroyOrder,udg_SE_Tree)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of SE_TreeCutter) Equal to (Order(SE_DestroyOrder))
Then - Actions
Destructible - Kill SE_Tree
Else - Actions
Unit - Order SE_TreeCutter to Stop
-------- SFX --------
Special Effect - Create a special effect at SE_ULoc using SE_SFX[3]
Special Effect - Destroy (Last created special effect)
-------- Clean Leak --------
Custom script: call DestroyGroup(udg_SE_DamageGroup)
Else - Actions
-------- Group 4 --------
-------- Stun Group --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SE_GroupNumber Equal to 4
Then - Actions
Set SE_Levels = (Load 1 of SE_UKey from SE_Hash)
Set SE_StunTimer = (Load 8 of SE_UKey from SE_Hash)
Set SE_StunCurrent = (Load 9 of SE_UKey from SE_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SE_StunCurrent Less than SE_StunTimer
Then - Actions
-------- Adding current duration --------
Hashtable - Save (SE_StunCurrent + 0.04) as 9 of SE_UKey in SE_Hash
Else - Actions
-------- Removing Buff --------
Unit - Remove SE_StunBuff buff from SE_U
-------- Clean Up --------
Hashtable - Clear all child hashtables of child SE_UKey in SE_Hash
Unit Group - Remove SE_U from SE_LoopGroup
Else - Actions
Custom script: call RemoveLocation(udg_SE_ULoc)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SE_U is dead) Equal to True
Then - Actions
Hashtable - Clear all child hashtables of child SE_UKey in SE_Hash
Unit Group - Remove SE_U from SE_LoopGroup
Unit - Remove SE_U from the game
Else - Actions
Else - Actions
Trigger - Turn off (This trigger)
[/trigger]

Changelogs
v1.1
-Clean Leak
-Reduced looping time
v1.2
-cleaned dummy leak
Contents

Split Earth v1.1 (Map)

Reviews
02:40, 30th Aug 2012 Magtheridon96: Approved. Well done.

Moderator

M

Moderator

02:40, 30th Aug 2012
Magtheridon96:

Approved.
Well done.
 
Top