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

[MUI] Ground Dive v1.2

The Blademaster digs the ground with his sword and moves underground, when he reaches to the targeted location, stomps the ground slowing the movement speed and attack rate of nearby units and rocks from the ground are thrown at units. |n|cffffcc00Level 1|r - 500 range, 100 damage, 50% movement and attack rate reduction, 1 second stun. |n|cffffcc00Level 2|r - 1000 range, 200 damage, 75% movement and attack rate reduction, 2 seconds stun. |n|cffffcc00Level 3|r - 1500 range, 300 damage, 100% movement and attack rate reduction, 3 seconds stun. |n|cff00ffffCooldown: 10 seconds.|r

  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Model effect of dig --------
      • Set DigEffect = abilities\weapons\DemolisherMissile\DemolisherMissile.mdl
      • -------- ------------- --------
      • -------- Dig animation --------
      • Set DigAnimation = Attack slam
      • -------- ------------- --------
      • -------- Model effect locating hero --------
      • Set UnitEffect = Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
      • -------- ------------- --------
      • -------- Range limit where rocks can get thrown --------
      • -------- If you change this, change the AoE of stomp ground ability to these values --------
      • Set GD_Range[1] = 350.00
      • Set GD_Range[2] = 600.00
      • Set GD_Range[3] = 800.00
      • -------- ------------- --------
      • -------- Damage dealt coming above --------
      • Set GD_Damage[1] = 100.00
      • Set GD_Damage[2] = 200.00
      • Set GD_Damage[3] = 300.00
      • -------- ------------- --------
      • -------- The max time length of the animation (Default 1.00) --------
      • Set GD_MaxWaitAnim = 1.00
      • -------- ------------- --------
      • -------- Speed of moving underground --------
      • Set GD_Speed = 8.00
      • -------- ------------- --------
      • -------- Minimum distance that the hero can cast --------
      • Set GD_MinimumDistanceCast = 150.00
      • -------- ------------- --------
      • -------- Spell error when casted lesser than the minimum range --------
      • Set GD_SpellError = Spell must be casted further.
      • -------- ------------- --------
      • -------- Mana refund if spell casted is lesser than the minimum range, if you change this, change the mana cost in Ground Dive ability to the corresponding values you're going to put here --------
      • Set GD_ManaRefund[1] = 90.00
      • Set GD_ManaRefund[2] = 110.00
      • Set GD_ManaRefund[3] = 130.00
      • -------- ------------- --------
      • -------- Not to touch --------
      • Set GD_Point1 = (Center of (Playable map area))
      • Unit - Create 1 Dummy (Ground Dive) for Neutral Passive at GD_Point1 facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_GD_Point1)
      • Set GD_TreeHarv = (Last created unit)
      • Unit - Add Harvest (Gold and Lumber) to GD_TreeHarv
      • -------- ------------- --------

  • Ground Dive
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ground Dive
    • Actions
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- NOT TO MODIFY --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • Set GD_Point1 = (Position of (Triggering unit))
      • Set GD_Point2 = (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between GD_Point1 and GD_Point2) Less than GD_MinimumDistanceCast
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
          • Custom script: call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 15, "|cffffcc00" + udg_GD_SpellError)
          • Wait 0.20 seconds
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + GD_ManaRefund[(Level of Ground Dive for (Triggering unit))])
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GD_IndexSize Equal to 0
            • Then - Actions
              • Trigger - Turn on Ground Dive Loop <gen>
            • Else - Actions
          • Set GD_IndexSize = (GD_IndexSize + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GD_IndexSize Greater than GD_IndexMaxSize
            • Then - Actions
              • Set GD_IndexMaxSize = GD_IndexSize
              • Set GD_CurrentIndex[GD_IndexSize] = GD_IndexSize
            • Else - Actions
          • Set GD_Index = GD_CurrentIndex[GD_IndexSize]
          • Set GD_Caster[GD_Index] = (Triggering unit)
          • Set GD_CasterLoc[GD_Index] = (Position of GD_Caster[GD_Index])
          • Set GD_TargetedLoc[GD_Index] = (Target point of ability being cast)
          • Set GD_SpellLevel[GD_Index] = (Level of Ground Dive for GD_Caster[GD_Index])
          • Set GD_Angle[GD_Index] = (Angle from GD_CasterLoc[GD_Index] to GD_TargetedLoc[GD_Index])
          • Set GD_Distance[GD_Index] = (Distance between GD_CasterLoc[GD_Index] and GD_TargetedLoc[GD_Index])
          • Set GD_WaitAnimation[GD_Index] = 0.00
          • Set GD_DistanceReached[GD_Index] = 0.00
          • Set GD_StartSpell[GD_Index] = False
          • -------- Hero can travel throught units and trees --------
          • Unit - Turn collision for GD_Caster[GD_Index] Off
          • -------- -------------- --------
          • -------- Pause it so it can't attack and interomp animation --------
          • Unit - Pause GD_Caster[GD_Index]
          • -------- -------------- --------
          • Animation - Play GD_Caster[GD_Index]'s DigAnimation animation
          • Custom script: call RemoveLocation(udg_GD_TargetedLoc[udg_GD_Index])
      • Custom script: call RemoveLocation(udg_GD_Point1)
      • Custom script: call RemoveLocation(udg_GD_Point2)

  • Ground Dive Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer GD_Loop) from 1 to GD_IndexSize, do (Actions)
        • Loop - Actions
          • Set GD_Index = GD_CurrentIndex[GD_Loop]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GD_Caster[GD_Index] Not equal to No unit
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GD_WaitAnimation[GD_Index] Less than GD_MaxWaitAnim
                • Then - Actions
                  • -------- ARTIFICIAL WAIT --------
                  • Set GD_WaitAnimation[GD_Index] = (GD_WaitAnimation[GD_Index] + 0.03)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GD_WaitAnimation[GD_Index] Greater than or equal to GD_MaxWaitAnim
                      • GD_StartSpell[GD_Index] Equal to False
                    • Then - Actions
                      • -------- Do Spell --------
                      • Set GD_StartSpell[GD_Index] = True
                      • Special Effect - Create a special effect at GD_CasterLoc[GD_Index] using DigEffect
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_GD_CasterLoc[udg_GD_Index])
                      • Unit - Hide GD_Caster[GD_Index]
                    • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GD_StartSpell[GD_Index] Equal to True
                  • GD_DistanceReached[GD_Index] Less than GD_Distance[GD_Index]
                • Then - Actions
                  • -------- Move hero --------
                  • Set GD_Point1 = (Position of GD_Caster[GD_Index])
                  • Set GD_Point2 = (GD_Point1 offset by GD_Speed towards GD_Angle[GD_Index] degrees)
                  • -------- Check if path is walkable --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at GD_Point2 of type Walkability is off) Equal to True
                    • Then - Actions
                      • -------- If not, hero stops there and come above --------
                      • Set GD_DistanceReached[GD_Index] = GD_Distance[GD_Index]
                    • Else - Actions
                      • -------- If yes, do this --------
                      • Unit - Move GD_Caster[GD_Index] instantly to GD_Point2
                      • Special Effect - Create a special effect at GD_Point2 using UnitEffect
                      • Special Effect - Destroy (Last created special effect)
                      • Set GD_DistanceReached[GD_Index] = (GD_DistanceReached[GD_Index] + GD_Speed)
                  • Custom script: call RemoveLocation(udg_GD_Point1)
                  • Custom script: call RemoveLocation(udg_GD_Point2)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • GD_DistanceReached[GD_Index] Greater than or equal to GD_Distance[GD_Index]
                    • Then - Actions
                      • -------- Effect --------
                      • Set GD_Point1 = (Position of GD_Caster[GD_Index])
                      • Special Effect - Create a special effect at GD_Point1 using DigEffect
                      • Special Effect - Destroy (Last created special effect)
                      • -------- --------------------- --------
                      • -------- Damage units --------
                      • Set GD_RockGroup = (Units within GD_Range[GD_SpellLevel[GD_Index]] of GD_Point1)
                      • Unit - Create 1 Dummy (Ground Dive) for (Owner of GD_Caster[GD_Index]) at GD_Point1 facing Default building facing degrees
                      • Set GD_TempUnit = (Last created unit)
                      • Unit - Add Stun to GD_TempUnit
                      • Unit - Add Stomp Ground to GD_TempUnit
                      • Unit - Add a 2.00 second Generic expiration timer to GD_TempUnit
                      • Unit - Set level of Stun for GD_TempUnit to GD_SpellLevel[GD_Index]
                      • Unit - Set level of Stomp Ground for (Last created unit) to GD_SpellLevel[GD_Index]
                      • Unit - Order GD_TempUnit to Human Mountain King - Thunder Clap
                      • Unit Group - Pick every unit in GD_RockGroup and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Owner of (Picked unit)) is an enemy of (Owner of GD_Caster[GD_Index])) Equal to True
                              • ((Picked unit) is A ground unit) Equal to True
                              • ((Picked unit) is alive) Equal to True
                            • Then - Actions
                              • Unit - Order GD_TempUnit to Neutral - Hurl Boulder (Picked unit)
                              • Unit - Cause GD_Caster[GD_Index] to damage (Picked unit), dealing GD_Damage[GD_SpellLevel[GD_Index]] damage of attack type Spells and damage type Universal
                            • Else - Actions
                      • Set GD_TempUnit = No unit
                      • Custom script: call DestroyGroup(udg_GD_RockGroup)
                      • -------- Destroy Trees --------
                      • Destructible - Pick every destructible within GD_Range[(Level of Ground Dive for GD_Caster[GD_Index])] of GD_Point1 and do (Actions)
                        • Loop - Actions
                          • Unit - Order GD_TreeHarv to Harvest (Picked destructible)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Current order of GD_TreeHarv) Equal to (Order(harvest))
                            • Then - Actions
                              • Destructible - Kill (Picked destructible)
                              • Unit - Order GD_TreeHarv to Stop
                            • Else - Actions
                      • Custom script: call RemoveLocation(udg_GD_Point1)
                      • -------- Rest Hero --------
                      • Unit - Unhide GD_Caster[GD_Index]
                      • Unit - Unpause GD_Caster[GD_Index]
                      • Unit - Turn collision for GD_Caster[GD_Index] On
                      • -------- Recycle indexes --------
                      • Set GD_Caster[GD_Index] = No unit
                      • Set GD_CurrentIndex[GD_Loop] = GD_CurrentIndex[GD_IndexSize]
                      • Set GD_CurrentIndex[GD_IndexSize] = GD_Index
                      • Set GD_IndexSize = (GD_IndexSize - 1)
                      • Set GD_Loop = (GD_Loop - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • GD_IndexSize Equal to 0
                        • Then - Actions
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
                • Else - Actions
            • Else - Actions
  • Ground Dive Dummy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy (Ground Dive)
    • Actions
      • Unit - Remove (Triggering unit) from the game
v1.0 - First release
v1.1 - Optimized code
v1.2 - More optimized code and some more fixes

Give me credits if you use this spell in your map and enjoy.

Keywords:
Ground, Dive, Stun, Slow, Underground, Travel, Damage
Contents

Ground Dive v1.2 (Map)

Reviews
10:49, 18th Dec 2012 Magtheridon96: Approved. Tip: Currently, your spell damages allies. Do you really want that? :o

Moderator

M

Moderator

10:49, 18th Dec 2012
Magtheridon96: Approved.

Tip: Currently, your spell damages allies. Do you really want that? :eek:
 
The wait is inconsistent with itself, would be better to use an artificial wait for it (even if it is a rediculously short time you're aiming for since waits vary wildly by how much they -actually- wait, the mana restoration amount (or refund whichever it is) should/could also be configurable. I'd also suggest changing the universal damage into spell damage and to change the format of "rock group"s selection to be more like this:


  • Set GD_RockGroup = (Units within GD_Range[(Level of Ground Dive for GD_Caster[GD_Index])] of GD_Point1
  • Unit Group - Pick every unit in GD_RockGroup and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • <<Unit Filter here>>
        • Then - Actions
          • <<Actions here>>
        • Else - Actions
  • Custom script: call DestroyGroup(udg_GD_RockGroup)


While this does not make the code more efficient it does make it much more readable and easier to modify for those who want to.

  • Unit - Order (Last created unit) to Neutral - Hurl Boulder (Picked unit)
While it's easy and nice to make stuns using this method of object editor data, I personally am one for generating trigger-induced stuns where you can then add the stun duration into the configurables, there's an array of ways to do this - such as pausing the unit and holding it paused for the next x seconds (artificial wait used here) you can also save the order the unit was given at the point of being stunned (including target point/unit/etc.) and then re-apply them when the stun ends thus creating effectively the same stun you get from Object editor stuns, while having all your configurables in the triggers and removing the need for an object editor equivelent to do it, Though, this whole little part at the bottom is mearly a suggestion

Edit:

Forgot to mention:
Why are you displaying a game message when you cast a spell? (even if it's for when there's an "error" casting (though I'm surprised you're allowing people to even cast a spell with the potential of it not actually doing anything anyway)

Would be better to use co-ordinates to move the unit rather than to use points

Other possible Configurables
- Main Ability
- Dummy Unit
- Rock Throw Ability
- Thunder Clap Ability

  • Unit - Create 1 Dummy (Ground Dive) for (Owner of GD_Caster[GD_Index]) at GD_Point1 facing Default building facing degrees
  • Unit - Add Harvest (Gold and Lumber) to (Last created unit)
  • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
This dummy could be created at the init, and configured there, also you may as well give the unit that ability by default (though that does work as a failsafe) creating so many of them is rather pointless
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
The wait is inconsistent with itself, would be better to use an artificial wait for it (even if it is a rediculously short time you're aiming for since waits vary wildly by how much they -actually- wait, the mana restoration amount (or refund whichever it is) should/could also be configurable.
Hmmm, if you make for me a short way to do it, I'll change, anyway for that should I put a boolean and a real for the wait and run in another trigger with the integer GD_Loop(or another loop)? I think the mana refund shouldn't be configurable because if people make a mistake constantly their hero loses too much mana, which would be unfair.

I'd also suggest changing the universal damage into spell damage and to change the format of "rock group"s selection to be more like this:

I.e.


While this does not make the code more efficient it does make it much more readable and easier to modify for those who want to.
Ok, I'll change the attack type to spell, about the rock group, do you really mean that people cant understand it? Well I think for the most of people know what is written there o_O
  • Unit - Order (Last created unit) to Neutral - Hurl Boulder (Picked unit)
While it's easy and nice to make stuns using this method of object editor data, I personally am one for generating trigger-induced stuns where you can then add the stun duration into the configurables, there's an array of ways to do this - such as pausing the unit and holding it paused for the next x seconds (artificial wait used here) you can also save the order the unit was given at the point of being stunned (including target point/unit/etc.) and then re-apply them when the stun ends thus creating effectively the same stun you get from Object editor stuns, while having all your configurables in the triggers and removing the need for an object editor equivelent to do it, Though, this whole little part at the bottom is mearly a suggestion

Thanks for the suggestion, but I really think that would be too much hardcode or confusing.

Would be better to use co-ordinates to move the unit rather than to use points
True, the SetUnitX/Y doesn't leak and isnt needed to create variables but I'm more accustomed to use the gui function, anyway, I'll do that to my next spells ^^.

Other possible Configurables
- Main Ability
- Dummy Unit
- Rock Throw Ability
- Thunder Clap Ability

Explain me what do you really mean :eek:

Unit - Create 1 Dummy (Ground Dive) for (Owner of GD_Caster[GD_Index]) at GD_Point1 facing Default building facing degrees
Unit - Add Harvest (Gold and Lumber) to (Last created unit)
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)

This dummy could be created at the init, and configured there, also you may as well give the unit that ability by default (though that does work as a failsafe) creating so many of them is rather pointless

True, I've thought that before but really didn't want to add that because I was on a hurry, and going to add that.

Forgot to mention:
Why are you displaying a game message when you cast a spell? (even if it's for when there's an "error" casting (though I'm surprised you're allowing people to even cast a spell with the potential of it not actually doing anything anyway)
Because some people are blind or dumb enough to think it is really a bug of the spell, so I did that. And thanks to you, you made me think about modify of which player gets that message.
Anyway thanks for your suggestions :D.
 
Review:
1.wait w/ 0.10 seconds doesnt work.It will return 0.27 because it is the minimum value of wait.Remove that.
2.Because you are using A unit starts the effect of an ability event,why not use remove/ add ability actions then set ability level?Because stop can bug if the caster was ordered by a player.You can also use my system CASC.
3.
  • Set GD_CasterLoc[GD_Index] = (Position of GD_Caster[GD_Index])
  • Set GD_TargetedLoc[GD_Index] = (Target point of ability being cast)
Remove this.
4.Move this:
  • Custom script: call RemoveLocation(udg_GD_Point1)
  • Custom script: call RemoveLocation(udg_GD_Point2)
Outside the if block to add some speed.
5.Move this:
Set GD_Caster[GD_Index] = (Triggering unit)
Outside the if-block.This must be the first line in the cast actions,because you are using
triggerin unit in the location so that it will add some speed too.
6.The debug msg shouldnt be showed to all players,make it PlayerGroup(myPlayer) only.
7.Debug MSG text should be configurable.
8.
Set GD_Distance[GD_Index] = (Distance between GD_CasterLoc[GD_Index] and GD_TargetedLoc[GD_Index])
This must be outside the if-block because you are using this in the conditions of If-block
9.Max wait animation should be configurable.
10.cache this:
Level of Ground Dive for GD_Caster[GD_Index]
so that it will increase speed.
11.Generic Expiration value should be configurable.
12.Instead of using Stomp for the ability,use a Stun System instead(search KhaosMachine's or Baseee's)
13.You create only one peasant for tree destroy.Create it in the Map Init,hide it,then add locust ability (UnitAddAbility(myDummy,'Aloc)) for recycling.Creating your own dummy to destroy it is a bad idea.Once you order it to harvest,order it to stop after checking the tree.
14.Cache last created unit to increase speed.
15.Move this:
Custom script: call RemoveLocation(udg_GD_Point1)
Custom script: call RemoveLocation(udg_GD_Point2
outside the if-block(this is inside the loop)
16.You must use SetUnitX/Y because you are using Turn Collision off/on to increase speed.
17.You can merge this:
  • All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • GD_WaitAnimation[GD_Index] Less than 1.00
    • Then - Actions
    • -------- ARTIFICIAL WAIT --------
    • Set GD_WaitAnimation[GD_Index] = (GD_WaitAnimation[GD_Index] + 0.03)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • GD_WaitAnimation[GD_Index] Greater than or equal to 1.00
    • GD_StartSpell[GD_Index] Equal to False
    • Then - Actions
    • -------- Do Spell --------
    • Set GD_StartSpell[GD_Index] = True
    • Special Effect - Create a special effect at GD_CasterLoc[GD_Index] using DigEffect
    • Special Effect - Destroy (Last created special effect)
    • Unit - Hide GD_Caster[GD_Index]
    • Custom script: call RemoveLocation(udg_GD_CasterLoc[udg_GD_Index]
Into one if-block.
Same with:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • GD_StartSpell[GD_Index] Equal to True
  • GD_DistanceReached[GD_Index] Less than GD_Distance[GD_Index]
  • Then - Actions
  • -------- Move hero --------
  • Set GD_Point1 = (Position of GD_Caster[GD_Index])
  • Set GD_Point2 = (GD_Point1 offset by GD_Speed towards GD_Angle[GD_Index] degrees)
  • Else - Actions
  • f (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • GD_DistanceReached[GD_Index] Greater than or equal to GD_Distance[GD_Index]
    • Then - Actions
    • -------- Effect --------
    • Set GD_Point1 = (Position of GD_Caster[GD_Index])
    • Special Effect - Create a special effect at GD_Point1 using DigEffect
    • Special Effect - Destroy (Last created special effect)
    • -------- --------------------- --------
    • -------- Damage units --------
    • Unit - Create 1 Dummy (Ground Dive) for (Owner of GD_Caster[GD_Index]) at GD_Point1 facing Default building facing degrees
    • Unit - Add Stomp Ground to (Last created unit)
    • Unit - Set level of Stomp Ground for (Last created unit) to (Level of Ground Dive for GD_Caster[GD_Index])
    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
    • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
    • Set GD_RockGroup = (Units within GD_Range[(Level of Ground Dive for GD_Caster[GD_Index])] of GD_Point1 matching ((((Matching unit) is alive) Equal to True) and ((((Owner of (Matching unit)) is an enemy of (Owner of GD_Caster[GD_Index])) Equal to True) and (((Matching unit) is
    • Unit Group - Pick every unit in GD_RockGroup and do (Actions)
    • Loop - Actions
    • Unit - Create 1 Dummy (Ground Dive) for (Owner of GD_Caster[GD_Index]) at GD_Point1 facing Default building facing degrees
    • Unit - Add Stun to (Last created unit)
    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
    • Unit - Set level of Stun for (Last created unit) to (Level of Ground Dive for GD_Caster[GD_Index])
    • Unit - Cause GD_Caster[GD_Index] to damage (Picked unit), dealing GD_Damage[(Level of Ground Dive for GD_Caster[GD_Index])] damage of attack type Hero and damage type Universal
    • Unit - Order (Last created unit) to Neutral - Hurl Boulder (Picked unit)
    • Custom script: call DestroyGroup(udg_GD_RockGroup)
    • -------- Destroy Trees --------
    • Unit - Create 1 Dummy (Ground Dive) for (Owner of GD_Caster[GD_Index]) at GD_Point1 facing Default building facing degrees
    • Unit - Add Harvest (Gold and Lumber) to (Last created unit)
    • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
    • Destructible - Pick every destructible within GD_Range[(Level of Ground Dive for GD_Caster[GD_Index])] of GD_Point1 and do (Actions)
    • Loop - Actions
    • Unit - Order (Last created unit) to Harvest (Picked destructible)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Current order of (Last created unit)) Equal to (Order(harvest))
    • Then - Actions
    • Destructible - Kill (Picked destructible)
    • Else - Actions
    • Custom script: call RemoveLocation(udg_GD_Point1)
    • -------- Rest Hero --------
    • Unit - Unhide GD_Caster[GD_Index]
    • Unit - Unpause GD_Caster[GD_Index]
    • Unit - Turn collision for GD_Caster[GD_Index] On
    • -------- Recycle indexes --------
    • Set GD_Caster[GD_Index] = No unit
    • Set GD_CurrentIndex[GD_Loop] = GD_CurrentIndex[GD_IndexSize]
    • Set GD_CurrentIndex[GD_IndexSize] = GD_Index
    • Set GD_IndexSize = (GD_IndexSize - 1)
    • Set GD_Loop = (GD_Loop - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • GD_IndexSize Equal to 0
    • Then - Actions
    • Trigger - Turn off (This trigger)
    • Else - Actions
18. Set GD_RockGroup = (Units within GD_Range[(Level of Ground Dive for GD_Caster[GD_Index])] of GD_Point1 matching ((((Matching unit) is alive) Equal to True) and ((((Owner of (Matching unit)) is an enemy of (Owner of GD_Caster[GD_Index])) Equal to True) and (((Matching unit) is

This should be no condition,the condition should be added in the Pick Unit Group to add readability.

This spell needs a lot of changes,only then it will be approved.
 
I think the mana refund shouldn't be configurable because if people make a mistake constantly their hero loses too much mana, which would be unfair.

I meant the amount of mana, not whether it happens at all or not


Wrda said:
Ok, I'll change the attack type to spell, about the rock group, do you really mean that people cant understand it? Well I think for the most of people know what is written there o_O

Referring to how easy it is to read all the conditions and how easy it is to modify them, while it's not complicated or impossible to understand, the problem comes when you're trying to modify it and it takes a while to find the condition you're trying to modify, or if you wanted to add another one

Wrda said:
Thanks for the suggestion, but I really think that would be too much hardcode or confusing.

Fair enough

Wrda said:
Explain me what do you really mean :eek:

They could also be configurables i.e. have variables set to them, then refer to the variables instead, as you do with any other configurable, using ability-type variables and unit-type variables


Wrda said:
Because some people are blind or dumb enough to think it is really a bug of the spell, so I did that. And thanks to you, you made me think about modify of which player gets that message.

That does beg the question though, why is the spell castable in a way which it does nothing? To avoid minimum range issues as such with things, or to apply them, what I go for is a automatic modification to the spell, i.e. I check the distance, and if it's too short I simply move the second location at the same angle to the value of the minimum range, and use that point instead
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
3.
Set GD_CasterLoc[GD_Index] = (Position of GD_Caster[GD_Index])
Set GD_TargetedLoc[GD_Index] = (Target point of ability being cast)
Remove this.
Lol if I remove this it will make no angle for the GD_Angle variable.
5.Move this:
Set GD_Caster[GD_Index] = (Triggering unit)
Outside the if-block.This must be the first line in the cast actions,because you are using
triggerin unit in the location so that it will add some speed too.
Where do you exactly want me to move it?
8.
Set GD_Distance[GD_Index] = (Distance between GD_CasterLoc[GD_Index] and GD_TargetedLoc[GD_Index])
This must be outside the if-block because you are using this in the conditions of If-block
Tell me where exactly.

11.Generic Expiration value should be configurable.
I don't really think it should be configurable, because it doesn't really matters how much time the unit stays there [0,2] seconds.

12.Instead of using Stomp for the ability,use a Stun System instead(search KhaosMachine's or Baseee's)
It's thunder clap ability, it doesn't stun units, only reduces ms and ar.

I've fixed the other things.
edit I didn't put the SetUnitX/Y too :eek:
 
Level 3
Joined
Jun 13, 2010
Messages
43
dear padawan , any thing that use hides tends to unselect the hero. at the end of the loop. Add reselection for the casting hero.
 
Since Radamantus pointed out that the lowest wait time is 0.27 seconds, I felt the need to barge in here to stop this myth from spreading with some evidence:

162098-albums5402-picture59669.png


This was done with a test for TriggerSleepAction(0), meaning a 0-second wait.
The Wait function will randomly add 0.1, 0.125, 0.15, 0.175 or 0.2 (maybe more or less) to your wait time.
It's not reliable at all.
 
Good spell 5/5 :wink:

My suggestion:
I personally would prefer it, if hero would just use Ground Dive into the direction I ordered him, instead of running + caste if it's in range. (If target-point is too far)

Note: In Ground Dive Loop trigger, when you damage units, you could store Picked unit into a variable. I guess you just haven't thought of that.
 
Top