• 🏆 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!

Chaos Portal V1.02

Thought I'd release another one for the start of the month, Continuing a little ghostly theme I have going in my head, Anyway here it is:


Creates a portal at the target point which will trap nearby units within it's effect radius and push and pull them around the cage tearing them apart dealing damage and repelling units trying to enter the cage away from it.

Level 1 - 325 AOE, 15 Damage per hit 5 Pulses, Weak knockback
Level 2 - 425 AOE, 20 Damage per hit, 7 Pulses, Medium knockback
Level 3 - 525 AOE, 25 Damage per hit, 9 Pulses, Strong knockback



- Powerful
- Heavily configurable
- Looks pretty =3
- No bugs
- Makes a good ultimate



  • Chaos Portal Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Do not touch --------
      • Hashtable - Create a hashtable
      • Set CP_Hash = (Last created hashtable)
      • -------- -------- --------
      • -------- Determines the area that will be caught --------
      • Set CP_AoeBase = 225.00
      • Set CP_AoePerLevel = 100.00
      • -------- Determines the damage dealt by Knockback/Pulses --------
      • Set CP_DamageBase = 10.00
      • Set CP_DamagePerLevel = 5.00
      • -------- Determines the strength of the knockback --------
      • Set CP_KnockbackStrengthBase = 14.00
      • Set CP_KnockbackStrengthPerLevel = 5.00
      • Set CP_KnockbackStrengthDetriment = 1.00
      • -------- Determines the amount of pulses --------
      • Set CP_PulsesBase = 2
      • Set CP_PulsesPerLevel = 2
      • -------- Determines the settings of the portal --------
      • Set CP_PortalStartSize = 2.00
      • Set CP_PortalGrowthSpeed = 2.00
      • Set CP_PortalMaxSize = 150.00
      • -------- Determines the settings of the Cage --------
      • -------- The Aoe of each part (comes into calculating how many parts there will be) --------
      • Set CP_CageSegmentAoe = 250.00
      • -------- Determines how fast each segment of the cage will fly --------
      • Set CP_CageSpeed = 20.00
      • -------- Determines the delay between each segment (also effects pulse rate) --------
      • Set CP_CageProjectileFireRate = 5
      • -------- Determines the height of the arc in relevence to the distance the Cage will be thrown at --------
      • Set CP_HeightMultiplyer = 0.75
      • -------- Determines the Dummy unit of the spell --------
      • Set CP_Portal = Chaos Portal
      • -------- Determines the unit model used as the Portal --------
      • Set CP_PortalModel = Abilities\Spells\Undead\Possession\PossessionCaster.mdl
      • -------- Determines the unit model used as the Cage --------
      • Set CP_CageModel = Abilities\Spells\Undead\OrbOfDeath\AnnihilationMissile.mdl
      • -------- Determines the unit model used as the Pulse --------
      • Set CP_PulseModel = Abilities\Spells\Other\HowlOfTerror\HowlCaster.mdl
      • -------- Determines the scale of the cage segments --------
      • Set CP_CageScale = 20.00
      • -------- Determines the spell used to act as the activation spell --------
      • Set CP_Spell = Chaos Portal
      • -------- Do not touch --------
      • -------- Tree Checking Set up --------
      • Set CP_TreeKill = True
      • Set CP_TreeAreaDestroy = 150.00
      • Set CP_TempPoint = (Center of (Playable map area))
      • Unit - Create 1 Peasant for Neutral Passive at CP_TempPoint facing Default building facing degrees
      • Set CP_TreeChecker = (Last created unit)
      • Unit - Hide CP_TreeChecker
      • Unit - Make CP_TreeChecker Invulnerable
      • Custom script: call RemoveLocation (udg_CP_TempPoint)
      • -------- ------ --------
  • Chaos Portal Activation
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to CP_Spell
    • Actions
      • -------- Spell setup --------
      • Set CP_U = (Triggering unit)
      • Set CP_TempPoint = (Target point of ability being cast)
      • Set CP_TempReal = (Real((Level of Chaos Portal for CP_U)))
      • -------- -------- --------
      • -------- Creating the portal --------
      • Unit - Create 1 CP_Portal for (Owner of CP_U) at CP_TempPoint facing Default building facing degrees
      • -------- -------- --------
      • Custom script: call RemoveLocation(udg_CP_TempPoint)
      • -------- Unit setup --------
      • Set CP_TempU = (Last created unit)
      • Custom script: set udg_CP_UHandle = GetHandleId(udg_CP_TempU)
      • -------- -------- --------
      • -------- Aoe calculation --------
      • Set CP_RealCache[1] = (CP_AoeBase + (CP_TempReal x CP_AoePerLevel))
      • -------- Original Casting Unit --------
      • Hashtable - Save Handle OfCP_U as 1 of CP_UHandle in CP_Hash
      • -------- Stage ID --------
      • Hashtable - Save 1 as 2 of CP_UHandle in CP_Hash
      • -------- Number of Pulses --------
      • Hashtable - Save (CP_PulsesBase + ((Integer(CP_TempReal)) x CP_PulsesPerLevel)) as 3 of CP_UHandle in CP_Hash
      • -------- AOE --------
      • Hashtable - Save CP_RealCache[1] as 4 of CP_UHandle in CP_Hash
      • -------- Damage --------
      • Hashtable - Save (CP_DamageBase + (CP_TempReal x CP_DamagePerLevel)) as 5 of CP_UHandle in CP_Hash
      • -------- Knockback Strength --------
      • Hashtable - Save (CP_KnockbackStrengthBase + (CP_TempReal x CP_KnockbackStrengthPerLevel)) as 6 of CP_UHandle in CP_Hash
      • -------- Number of Cage Segments Needed --------
      • Hashtable - Save (Integer(((3.12 x (2.00 x CP_RealCache[1])) / CP_CageSegmentAoe))) as 7 of CP_UHandle in CP_Hash
      • -------- Current Size --------
      • Hashtable - Save CP_PortalStartSize as 8 of CP_UHandle in CP_Hash
      • -------- Current Projectile Counter --------
      • Hashtable - Save 0 as 9 of CP_UHandle in CP_Hash
      • -------- Current Pulse Counter --------
      • Hashtable - Save 0 as 10 of CP_UHandle in CP_Hash
      • -------- Current Pulses released --------
      • Hashtable - Save 0 as 11 of CP_UHandle in CP_Hash
      • -------- Starting size applied --------
      • Animation - Change CP_TempU's size to (CP_PortalStartSize%, CP_PortalStartSize%, CP_PortalMaxSize%) of its original size
      • -------- Added to unit group --------
      • Unit Group - Add CP_TempU to CP_PortalGroup
      • Trigger - Turn on Chaos Portal Loop <gen>
  • Chaos Portal Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CP_PortalGroup and do (Actions)
        • Loop - Actions
          • Set CP_U = (Picked unit)
          • Custom script: set udg_CP_UHandle = GetHandleId(udg_CP_U)
          • Set CP_TempInteger = (Load 2 of CP_UHandle from CP_Hash)
          • -------- Stage 1 (of 4) --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CP_TempInteger Equal to 1
            • Then - Actions
              • -------- Calculate current growth --------
              • Set CP_RealCache[1] = ((Load 8 of CP_UHandle from CP_Hash) + CP_PortalGrowthSpeed)
              • -------- Check current size --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CP_RealCache[1] Less than CP_PortalMaxSize
                • Then - Actions
                  • -------- Change size --------
                  • Animation - Change CP_U's size to (CP_RealCache[1]%, CP_RealCache[1]%, CP_RealCache[1]%) of its original size
                  • -------- Save size --------
                  • Hashtable - Save CP_RealCache[1] as 8 of CP_UHandle in CP_Hash
                • Else - Actions
                  • -------- Change stage --------
                  • Hashtable - Save 2 as 2 of CP_UHandle in CP_Hash
            • Else - Actions
              • -------- Stage 2 --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CP_TempInteger Equal to 2
                • Then - Actions
                  • -------- Check Projectile delay timer --------
                  • Set CP_TempInteger = (Load 9 of CP_UHandle from CP_Hash)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CP_TempInteger Equal to CP_CageProjectileFireRate
                    • Then - Actions
                      • -------- Resetting delay timer --------
                      • Hashtable - Save 0 as 9 of CP_UHandle in CP_Hash
                      • -------- Porjectile setup --------
                      • Set CP_TempPoint = (Position of CP_U)
                      • Set CP_Angle = 0.00
                      • -------- Launching projectiles --------
                      • Set CP_TempU2 = (Load 1 of CP_UHandle in CP_Hash)
                      • Set CP_RealCache[0] = (Real((Load 7 of CP_UHandle from CP_Hash)))
                      • Set CP_RealCache[1] = (Load 4 of CP_UHandle from CP_Hash)
                      • Set CP_RealCache[2] = (Load 5 of CP_UHandle from CP_Hash)
                      • Set CP_RealCache[3] = (Load 6 of CP_UHandle from CP_Hash)
                      • For each (Integer CP_i) from 1 to (Load 7 of CP_UHandle from CP_Hash), do (Actions)
                        • Loop - Actions
                          • -------- Projectile data setup --------
                          • Set CP_Angle = (CP_Angle + (360.00 / CP_RealCache[0]))
                          • Set CP_TempPoint2 = (CP_TempPoint offset by CP_RealCache[1] towards CP_Angle degrees)
                          • Set CP_TempReal = (Distance between CP_TempPoint and CP_TempPoint2)
                          • Custom script: call RemoveLocation(udg_CP_TempPoint2)
                          • -------- Creating projectile --------
                          • Unit - Create 1 CP_Portal for (Owner of CP_U) at CP_TempPoint facing CP_Angle degrees
                          • Set CP_TempU = (Last created unit)
                          • Custom script: set udg_CP_UHandleC = GetHandleId(udg_CP_TempU)
                          • Special Effect - Create a special effect attached to the chest of CP_TempU using CP_CageModel
                          • Hashtable - Save Handle Of(Last created special effect) as 20 of CP_UHandleC in CP_Hash
                          • Animation - Change CP_TempU's size to (CP_CageScale%, CP_CageScale%, CP_CageScale%) of its original size
                          • -------- Original Casting Unit --------
                          • Hashtable - Save Handle OfCP_TempU2 as 1 of CP_UHandleC in CP_Hash
                          • -------- Stage ID --------
                          • Hashtable - Save 3 as 2 of CP_UHandleC in CP_Hash
                          • -------- Damage --------
                          • Hashtable - Save CP_RealCache[2] as 5 of CP_UHandleC in CP_Hash
                          • -------- Knockback Strength --------
                          • Hashtable - Save CP_RealCache[3] as 6 of CP_UHandleC in CP_Hash
                          • -------- Saving Max distance --------
                          • Hashtable - Save CP_TempReal as 7 of CP_UHandleC in CP_Hash
                          • -------- Saving Max height --------
                          • Hashtable - Save (CP_TempReal x CP_HeightMultiplyer) as 8 of CP_UHandleC in CP_Hash
                          • -------- Initialising starting distance --------
                          • Hashtable - Save 0.00 as 9 of CP_UHandleC in CP_Hash
                          • -------- Original Portal --------
                          • Hashtable - Save Handle OfCP_U as 10 of CP_UHandleC in CP_Hash
                          • -------- Adding to unit group --------
                          • Unit Group - Add CP_TempU to CP_PortalGroup
                      • Custom script: call RemoveLocation(udg_CP_TempPoint)
                    • Else - Actions
                      • -------- Increasing delay timer --------
                      • Hashtable - Save (CP_TempInteger + 1) as 9 of CP_UHandle in CP_Hash
                  • -------- Check Pulse delay timer --------
                  • Set CP_TempInteger = (Load 10 of CP_UHandle from CP_Hash)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CP_TempInteger Equal to (CP_CageProjectileFireRate x 10)
                    • Then - Actions
                      • -------- Resetting delay timer --------
                      • Hashtable - Save 0 as 10 of CP_UHandle in CP_Hash
                      • -------- Checking pulse count --------
                      • Set CP_TempInteger = (Load 11 of CP_UHandle from CP_Hash)
                      • Set CP_TempPoint = (Position of CP_U)
                      • -------- Creating pulse --------
                      • Unit - Create 1 CP_Portal for (Owner of CP_U) at CP_TempPoint facing Default building facing degrees
                      • -------- Scaling pulse --------
                      • Set CP_RealCache[1] = ((Load 4 of CP_UHandle from CP_Hash) / 3.00)
                      • Animation - Change (Last created unit)'s size to (CP_RealCache[1]%, CP_RealCache[1]%, CP_RealCache[1]%) of its original size
                      • Special Effect - Create a special effect attached to the overhead of (Last created unit) using CP_PulseModel
                      • -------- Removing pulse --------
                      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                      • -------- Pulse effects setup --------
                      • Set CP_TempGroup = (Units within (Load 4 of CP_UHandle from CP_Hash) of CP_TempPoint)
                      • Custom script: set udg_CP_TempX = GetUnitX(udg_CP_U)
                      • Custom script: set udg_CP_TempY = GetUnitY(udg_CP_U)
                      • -------- Pulse effects --------
                      • Unit Group - Pick every unit in CP_TempGroup and do (Actions)
                        • Loop - Actions
                          • -------- Finding target units --------
                          • Set CP_TempU = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (CP_TempU is Magic Immune) Equal to False
                              • (CP_TempU is A structure) Equal to False
                              • (CP_TempU is alive) Equal to True
                              • (CP_TempU belongs to an enemy of (Owner of CP_U)) Equal to True
                              • (CP_TempU is A ground unit) Equal to True
                            • Then - Actions
                              • -------- Getting co-ordinates and setup --------
                              • Custom script: set udg_CP_TempX2 = GetUnitX(udg_CP_TempU)
                              • Custom script: set udg_CP_TempY2 = GetUnitY(udg_CP_TempU)
                              • Custom script: set udg_CP_UHandleC = GetHandleId(udg_CP_TempU)
                              • -------- Damage --------
                              • Unit - Cause (Load 1 of CP_UHandle in CP_Hash) to damage CP_TempU, dealing (Load 5 of CP_UHandle from CP_Hash) damage of attack type Spells and damage type Normal
                              • -------- Knockback setup --------
                              • -------- Knockback strength --------
                              • Hashtable - Save (Load 6 of CP_UHandle from CP_Hash) as 13 of CP_UHandleC in CP_Hash
                              • -------- Knockback Angle setup --------
                              • Hashtable - Save CP_TempX as 14 of CP_UHandleC in CP_Hash
                              • Hashtable - Save CP_TempY as 15 of CP_UHandleC in CP_Hash
                              • Hashtable - Save CP_TempX2 as 16 of CP_UHandleC in CP_Hash
                              • Hashtable - Save CP_TempY2 as 17 of CP_UHandleC in CP_Hash
                              • -------- Added to group --------
                              • Unit Group - Add CP_TempU to CP_PortalGroup
                              • -------- Stage ID --------
                              • Hashtable - Save 4 as 2 of CP_UHandleC in CP_Hash
                            • Else - Actions
                      • -------- Cleanup --------
                      • Custom script: call DestroyGroup (udg_CP_TempGroup)
                      • Custom script: call RemoveLocation (udg_CP_TempPoint)
                      • -------- Checking pulse count (cleanup) --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CP_TempInteger Equal to (Load 3 of CP_UHandle from CP_Hash)
                        • Then - Actions
                          • Unit Group - Remove CP_U from CP_PortalGroup
                          • Hashtable - Clear all child hashtables of child CP_UHandle in CP_Hash
                          • Unit - Kill CP_U
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (CP_PortalGroup is empty) Equal to True
                            • Then - Actions
                              • Trigger - Turn off (This trigger)
                            • Else - Actions
                        • Else - Actions
                          • Hashtable - Save (CP_TempInteger + 1) as 11 of CP_UHandle in CP_Hash
                    • Else - Actions
                      • -------- Increasing delay timer --------
                      • Hashtable - Save (CP_TempInteger + 1) as 10 of CP_UHandle in CP_Hash
                • Else - Actions
                  • -------- Stage 3 --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CP_TempInteger Equal to 3
                    • Then - Actions
                      • -------- Projectile movement setup --------
                      • Custom script: set udg_CP_TempX = GetUnitX(udg_CP_U)
                      • Custom script: set udg_CP_TempY = GetUnitY(udg_CP_U)
                      • Custom script: set udg_CP_Angle = (GetUnitFacing(udg_CP_U) * bj_DEGTORAD)
                      • -------- Projectile movement --------
                      • Custom script: call SetUnitX(udg_CP_U, udg_CP_TempX + udg_CP_CageSpeed * Cos(udg_CP_Angle))
                      • Custom script: call SetUnitY(udg_CP_U, udg_CP_TempY + udg_CP_CageSpeed * Sin(udg_CP_Angle))
                      • -------- Height calculation --------
                      • Set CP_RealCache[1] = (Load 7 of CP_UHandle from CP_Hash)
                      • Set CP_RealCache[2] = (Load 8 of CP_UHandle from CP_Hash)
                      • Set CP_RealCache[3] = ((Load 9 of CP_UHandle from CP_Hash) + CP_CageSpeed)
                      • Hashtable - Save CP_RealCache[3] as 9 of CP_UHandle in CP_Hash
                      • Set CP_RealCache[4] = (((4.00 x CP_RealCache[2]) / CP_RealCache[1]) x ((CP_RealCache[3] / CP_RealCache[1]) x (CP_RealCache[1] - CP_RealCache[3])))
                      • Animation - Change CP_U flying height to CP_RealCache[4] at 0.00
                      • -------- Checking height --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CP_RealCache[4] Less than 0.00
                        • Then - Actions
                          • -------- Damage and target setup --------
                          • Set CP_TempU2 = (Load 10 of CP_UHandle in CP_Hash)
                          • Custom script: set udg_CP_UHandleC2 = GetHandleId(udg_CP_TempU2)
                          • Custom script: set udg_CP_TempX2 = GetUnitX(udg_CP_TempU2)
                          • Custom script: set udg_CP_TempY2 = GetUnitY(udg_CP_TempU2)
                          • Set CP_TempPoint2 = (Position of CP_TempU2)
                          • Set CP_TempPoint = (Position of CP_U)
                          • Set CP_TempGroup = (Units within CP_CageSegmentAoe of CP_TempPoint)
                          • -------- Damage and knockback --------
                          • Unit Group - Pick every unit in CP_TempGroup and do (Actions)
                            • Loop - Actions
                              • -------- Finding targets --------
                              • Set CP_TempU = (Picked unit)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (CP_TempU is Magic Immune) Equal to False
                                  • (CP_TempU is A structure) Equal to False
                                  • (CP_TempU is alive) Equal to True
                                  • (CP_TempU belongs to an enemy of (Owner of CP_U)) Equal to True
                                  • (CP_TempU is A ground unit) Equal to True
                                • Then - Actions
                                  • -------- setup --------
                                  • Custom script: set udg_CP_UHandleC = GetHandleId(udg_CP_TempU)
                                  • -------- Damage --------
                                  • Unit - Cause (Load 1 of CP_UHandle in CP_Hash) to damage CP_TempU, dealing (Load 5 of CP_UHandle from CP_Hash) damage of attack type Spells and damage type Normal
                                  • -------- Knockback setup --------
                                  • -------- Knockback strength --------
                                  • Hashtable - Save (Load 6 of CP_UHandle from CP_Hash) as 13 of CP_UHandleC in CP_Hash
                                  • -------- Knockback Angle setup --------
                                  • Set CP_TempPoint3 = (Position of CP_TempU)
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Distance between CP_TempPoint2 and CP_TempPoint3) Greater than or equal to ((Load 4 of CP_UHandleC2 from CP_Hash) + (CP_CageSegmentAoe / 2.00))
                                    • Then - Actions
                                      • Hashtable - Save CP_TempX2 as 14 of CP_UHandleC in CP_Hash
                                      • Hashtable - Save CP_TempY2 as 15 of CP_UHandleC in CP_Hash
                                      • Hashtable - Save CP_TempY as 17 of CP_UHandleC in CP_Hash
                                      • Hashtable - Save CP_TempX as 16 of CP_UHandleC in CP_Hash
                                    • Else - Actions
                                      • Hashtable - Save CP_TempX as 14 of CP_UHandleC in CP_Hash
                                      • Hashtable - Save CP_TempY as 15 of CP_UHandleC in CP_Hash
                                      • Hashtable - Save CP_TempX2 as 16 of CP_UHandleC in CP_Hash
                                      • Hashtable - Save CP_TempY2 as 17 of CP_UHandleC in CP_Hash
                                  • -------- Added to group --------
                                  • Unit Group - Add CP_TempU to CP_PortalGroup
                                  • -------- Stage ID --------
                                  • Hashtable - Save 4 as 2 of CP_UHandleC in CP_Hash
                                  • Custom script: call RemoveLocation (udg_CP_TempPoint3)
                                • Else - Actions
                          • Custom script: call DestroyGroup (udg_CP_TempGroup)
                          • Custom script: call RemoveLocation (udg_CP_TempPoint2)
                          • Custom script: call RemoveLocation (udg_CP_TempPoint)
                          • -------- Cleanup --------
                          • Special Effect - Destroy (Load 20 of CP_UHandle in CP_Hash)
                          • Unit Group - Remove CP_U from CP_PortalGroup
                          • Hashtable - Clear all child hashtables of child CP_UHandle in CP_Hash
                          • Unit - Kill CP_U
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (CP_PortalGroup is empty) Equal to True
                            • Then - Actions
                              • Trigger - Turn off (This trigger)
                            • Else - Actions
                        • Else - Actions
                    • Else - Actions
                      • -------- Stage 4 --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CP_TempInteger Equal to 4
                        • Then - Actions
                          • -------- Movement setup --------
                          • Set CP_TempPoint = (Point((Load 14 of CP_UHandle from CP_Hash), (Load 15 of CP_UHandle from CP_Hash)))
                          • Set CP_TempPoint2 = (Point((Load 16 of CP_UHandle from CP_Hash), (Load 17 of CP_UHandle from CP_Hash)))
                          • -------- ------ --------
                          • -------- Movement --------
                          • Set CP_TempReal = ((Load 13 of CP_UHandle from CP_Hash) - CP_KnockbackStrengthDetriment)
                          • Hashtable - Save CP_TempReal as 13 of CP_UHandle in CP_Hash
                          • Custom script: set udg_CP_Angle = AngleBetweenPoints(udg_CP_TempPoint, udg_CP_TempPoint2) * bj_DEGTORAD
                          • Custom script: call RemoveLocation(udg_CP_TempPoint)
                          • Set CP_TempPoint = (CP_TempPoint2 offset by CP_TempReal towards CP_Angle degrees)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Playable map area) contains CP_TempPoint) Equal to True
                              • (Terrain pathing at CP_TempPoint of type Walkability is off) Equal to False
                            • Then - Actions
                              • Custom script: set udg_CP_TempX = GetUnitX(udg_CP_U)
                              • Custom script: set udg_CP_TempY = GetUnitY(udg_CP_U)
                              • Custom script: call SetUnitX(udg_CP_U, udg_CP_TempX + udg_CP_TempReal * Cos(udg_CP_Angle))
                              • Custom script: call SetUnitY(udg_CP_U, udg_CP_TempY + udg_CP_TempReal * Sin(udg_CP_Angle))
                              • -------- Tree Destruction --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • CP_TreeKill Equal to True
                                • Then - Actions
                                  • Destructible - Pick every destructible within CP_TreeAreaDestroy of CP_TempPoint and do (Actions)
                                    • Loop - Actions
                                      • Unit - Order CP_TreeChecker to Harvest (Picked destructible)
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Current order of CP_TreeChecker) Equal to (Order(harvest))
                                        • Then - Actions
                                          • Destructible - Kill (Picked destructible)
                                        • Else - Actions
                                      • Unit - Order CP_TreeChecker to Stop
                                • Else - Actions
                              • -------- ------ --------
                            • Else - Actions
                          • -------- ------ --------
                          • Custom script: call RemoveLocation(udg_CP_TempPoint2)
                          • Custom script: call RemoveLocation(udg_CP_TempPoint)
                          • -------- End of Knockback --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Load 13 of CP_UHandle from CP_Hash) Less than or equal to 0.00
                            • Then - Actions
                              • Unit Group - Remove CP_U from CP_PortalGroup
                              • Hashtable - Clear all child hashtables of child CP_UHandle in CP_Hash
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (CP_PortalGroup is empty) Equal to True
                                • Then - Actions
                                  • Trigger - Turn off (This trigger)
                                • Else - Actions
                            • Else - Actions
                          • -------- ------ --------
                        • Else - Actions



-=V1.00=-
- Initial upload
- Expect errors
-=V1.01=-
- Modified Default settings (to remove lag)
- Added a special effect to make the cage not look like it has holes in it with the settingsp
-=V1.02=-
- Used the dummy model (so only one dummy unit is now used)
- Made small efficiency changes


Enjoy and Give credits if you use this in your map
Do not modify/steal and republish this spell without my permission

-=Note on effects=-

All the special effects that are created (the speed of them and the rate at which they are fired) is required to prevent units from leaking in and out of the cage, I aplogise if this generates any lag for you due to the amount of special effects, but please understand that it is necessary for the spell to work. In the comments I have said the three things you can changed to reduce lag and I will state tem here as well

1) The AOE of each Cage segment (increasing it will reduce the amount in the circle in total)
2) The models used for the special effects
3) The AOE of the spell itself, reducing it will reduce the amount of segments in the circle


Keywords:
Portal, Chaos, Cut off, Cage, Trap, Spirit, Ghost, Magical, Spell, Pretty.
Contents

Chaos Portal (Map)

Reviews
Approved This spell is very well done. The tooltip could have Level 1, Level 2 and Level 3 coloured and the extra space removed. The "facing" of the moving units could be set with SetUnitAnimationByIndex so the projectile would face the direction...

Moderator

M

Moderator

Reviewed by Maker, Chaos Portal V1.02, 9th Mar 2012

Approved
This spell is very well done.

The tooltip could have Level 1, Level 2 and Level 3 coloured and the extra space removed. The "facing" of the moving units could be set with
SetUnitAnimationByIndex so the projectile would face the direction of the arc. But these are minor issues.

The spell's effects are nice, but I personally would like slightly more subtle approach.

4.25/5

Reviewed by Maker, Chaos Portal V1.01, 5th Feb 2012

Required changes
  • TempPoint seems to be leaking in stage 2
Suggested changes
  • Small efficiency improvements, like calculating bj_DEGTORAD when setting angle, not separately for cos and sin
    Also load values into variables from hashtable before loops,
    don't repeatedly load the value inside the loop
  • There are a bit too many effects in my opinion
  • Variable is not use for unit type in loop 2 when you create the dummy
  • If you used the well know dummy unit model and attached the effect instead of
    using the effect as the model, you could set the effect's facing to be the same
    as the direction of the movement for the Chaos Cage dummies
Some times less is more. There are quite many effects by default. I tried lowering CageSpeed to 5 and ProjectileFireRate to 10
and it looked more impressive.
21:45, 2nd Mar 2012
Pharaoh_: Decrease the dummy missiles' count; two spells at the same time create immense lag that predicts freezing of the program.

Potential for Highly Recommended.
 
Yeah I was concerned about that happening on lower-end computers, to solve it you either increase the AOE of the Cage segments, change the model of the Cage Segment unit, or decrease the AOE of the spell

Edit: Although as far as actual problems with the spell, the only problem is your computer's processor, nothing to do with the coding of the spell, the problem isn't hard to fix I just up the defaults for showcasing purposes
 
Last edited:
Well I certainly didn't come across any problems with lag and even when I cast enough to make it lag (about 4 at the same time) I then modified the fields which I said before to a more "normal" rather than my showcasing version and it took 10 casts at the same time to make it Lag, and that was with only changing one of them. So yes it is more the computers fault, as the better your computer the more it can handle, I just suited it to mine rather than the "norm" but if that's problematic then you can very easily make the changes necessary with minimal effort, on a side note though knockback /never/ generated a problem on my side.

My point is, it's not something programmatically which is wrong, it's just the configuration needing to be adjusted to suit your computers , and I already said the three things you can modify to rectify the problem of lag, so really no more comments on lag if you please, as they're rather pointless now
 
and I already said the three things you can modify to rectify the problem of lag, so really no more comments on lag if you please, as they're rather pointless now

They are not pointless. The point for a spell to be approved is to be MUI. When only two of its instances result lag to most of us, it should be fixed.

Edit: What part did you change to reduce the lag?
The new sfx is unneeded and it just burdens the spell even more. I also dislike the "Howl of terror" sound spam.
 
Last edited:

  • Unit Group - Pick every unit in CP_TempGroup and do (Actions)
    • Loop - Actions
      • -------- Finding target units --------
      • Set CP_TempU = (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CP_TempU is Magic Immune) Equal to False
          • (CP_TempU is A structure) Equal to False
          • (CP_TempU is alive) Equal to True
          • (CP_TempU belongs to an enemy of (Owner of CP_U)) Equal to True
          • (CP_TempU is A ground unit) Equal to True
      • Then - Actions


=P

I put spell breakers in the test map to make sure it didn't work on magic immunes >_>
 
Level 10
Joined
Aug 21, 2010
Messages
316
I tried your spell with two heroes at the same time and the result was Ctrl + Alt + Delete

MEGA LAG!!!

My suggestion to you is this only affects heroes,and not all units

Otherwise spell is ok
 
Last edited:
Level 10
Joined
Aug 21, 2010
Messages
316
Um, what? Are you running on an extremely old computer or something? Plus making it only affect heros would kind of make the spell useless. You can do that yourself if it suits your purposes but for the rest of us who it runs fine with can have it as it is XD


And as for your theory about the bad machine configurations.

My machine:

Processor - AMD Fusion A6-3400M Quad Core 2.3GHz 4MB L2
Chipset - AMD A60M
RAM - 8GB DDR3 1600MHz
VGA - AMD Radeon HD 6720G2 Dual Graphics
(AMD Radeon™ HD 6650M 1GB GDDR3,
HD 6520G APu Hybrid CrossFireX™)
 
Look we're not here to discuss computer specs required for the spell, I'm simply saying Since I already made modifications to prevent the two-cast lag, and already said /how/ to get rid of it if it still causes lag, I personally can cast the spell 4-5 times at the same time and experience no lag, and most others I imagine can cast at least two, in either case, I'm not going to be modifying the spell further because there's nothing wrong with it.
 
To decrease the possibility of ingame lag, you need to optimise the loops here.
You can do this by using dynamic indexing instead of hashtables.

This would be a huge improvement because you would get rid of a lot of function calls and you wouldn't need to pick all units in the caster group, but loop through a list of spell instances which is theoretically a 30% speed increase

The total speed increase would be a little over 300%
 
Look we're not here to discuss computer specs required for the spell, I'm simply saying Since I already made modifications to prevent the two-cast lag, and already said /how/ to get rid of it if it still causes lag, I personally can cast the spell 4-5 times at the same time and experience no lag, and most others I imagine can cast at least two, in either case, I'm not going to be modifying the spell further because there's nothing wrong with it.
There is a problem with it, and that problem is lag. If I got lag from this test map, with ONLY this spell in it... Just imagine a map full of periodic systems and other things going on, I could imagine seeing a shit ton more lag, from a SINGLE cast.
 
Level 12
Joined
Aug 12, 2008
Messages
349
Tank-Commander, why don't you try out the way that Mag suggested to you? It's about 300% speed improvement!
Lag is indeed a problem, I think, because if one spell that lags even if it had been fully optimised by the way you suggested, but when comes to lots of spells and with systems in a map. It definitely would lag spike or something as said by maddeem. :)
 
Level 13
Joined
Oct 16, 2010
Messages
731
I like it! My only problem is that the knockback can be slightly glitchy. I tried it on the enemy Archmage and it ended up getting knocked away just as the spell ended, leaving the Archmage stuck in some rocks that it shouldn't be able to get too. I also found that if you target a single unit and just put the center of the spell on them, they don't get knocked around. Other than that I like! :D No lag happened when I tested! :D
 
The archmage managing to get through rocks would be a terrain error on my part (there's probably a hole in the obstruction which it can fit through) Although the knocking back as it ends is intentional, also if the distance between the portal centre and the unit is 0, then I wouldn't be surprised if they didn't move at all but sadly I can't change that
 
Top