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

GUI Stampede Spell

Status
Not open for further replies.
Level 5
Joined
Apr 13, 2008
Messages
184
Hello, anyone free to look at my GUI stampede spell, im trying to do a mini spellpack for hiveworkshop,
it has quite some problems as im new to MUI.

I cant seem to adjust the width properly and the Stampede missiles just randomly disappear sometimes?
Thank you for taking the time to read this post.

  • Stampede Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set StampedeDamage[1] = 60.00
      • Set StampedeDamage[2] = 60.00
      • Set StampedeDamage[3] = 60.00
      • Set StampedeDamage[4] = 60.00
      • -------- --------
      • Set StampedeMaxRange[1] = 1000.00
      • Set StampedeMaxRange[2] = 1000.00
      • Set StampedeMaxRange[3] = 1000.00
      • Set StampedeMaxRange[4] = 1000.00
      • -------- --------
      • Set StampedeMinRange[1] = 100.00
      • Set StampedeMinRange[2] = 100.00
      • Set StampedeMinRange[3] = 100.00
      • Set StampedeMinRange[4] = 100.00
      • -------- --------
      • Set StampedeWidth[1] = -800.00
      • Set StampedeWidth[2] = -800.00
      • Set StampedeWidth[3] = -800.00
      • Set StampedeWidth[4] = -800.00
      • -------- --------
      • Set StampedeBeastCollisionRadius[1] = 55.00
      • Set StampedeBeastCollisionRadius[2] = 55.00
      • Set StampedeBeastCollisionRadius[3] = 55.00
      • Set StampedeBeastCollisionRadius[4] = 55.00
      • -------- --------
      • Set StampedeBeastPerSec[1] = 3
      • Set StampedeBeastPerSec[2] = 3
      • Set StampedeBeastPerSec[3] = 3
      • Set StampedeBeastPerSec[4] = 3
      • -------- --------
      • Set StampedeDuration[1] = 10.00
      • Set StampedeDuration[2] = 10.00
      • Set StampedeDuration[3] = 10.00
      • Set StampedeDuration[4] = 10.00
      • -------- --------
      • Set StampedeBeastSpawnRate[1] = 1.00
      • Set StampedeBeastSpawnRate[2] = 1.00
      • Set StampedeBeastSpawnRate[3] = 1.00
      • Set StampedeBeastSpawnRate[4] = 1.00
      • -------- --------
  • Stampede Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Stampede (Custom)
    • Actions
      • Set StampedeMaxIndex = (StampedeMaxIndex + 1)
      • Set StampedeCaster[StampedeMaxIndex] = (Triggering unit)
      • Set StampedeCasterPoint[StampedeMaxIndex] = (Position of (Triggering unit))
      • Set StampedeTargetPoint[StampedeMaxIndex] = (Target point of ability being cast)
      • Set StampedeCurrentLevel[StampedeMaxIndex] = (Level of Stampede (Custom) for StampedeCaster[StampedeMaxIndex])
      • Set StampedeDuration[StampedeMaxIndex] = StampedeDuration[StampedeCurrentLevel[StampedeMaxIndex]]
      • Set StampedeCounter[StampedeMaxIndex] = 0.00
      • Set StampedeMainCounter[StampedeMaxIndex] = 0.00
      • Set StampedeMainCounter2[StampedeMaxIndex] = 0.00
      • Set StampedeAngle[StampedeMaxIndex] = (Angle from StampedeCasterPoint[StampedeMaxIndex] to StampedeTargetPoint[StampedeMaxIndex])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • StampedeMaxIndex Greater than or equal to 1
        • Then - Actions
          • Trigger - Turn on Stampede Effect <gen>
          • Game - Display to (All players) the text: STart
        • Else - Actions
  • Stampede Effect
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer StampedeCurrentIndex) from 1 to StampedeMaxIndex, do (Actions)
        • Loop - Actions
          • Set StampedeMainCounter[StampedeCurrentIndex] = (StampedeMainCounter[StampedeCurrentIndex] + 0.05)
          • Set StampedeMainCounter2[StampedeCurrentIndex] = (StampedeMainCounter2[StampedeCurrentIndex] + 0.05)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • StampedeMainCounter2[StampedeCurrentIndex] Greater than or equal to StampedeDuration[StampedeCurrentLevel[StampedeCurrentIndex]]
            • Then - Actions
              • Custom script: call RemoveLocation (udg_StampedeCasterPoint[udg_StampedeCurrentIndex])
              • Custom script: call RemoveLocation (udg_StampedeTargetPoint[udg_StampedeCurrentIndex])
              • Set StampedeMainCounter[StampedeCurrentIndex] = 0.00
              • Set StampedeMainCounter2[StampedeCurrentIndex] = 0.00
              • Set StampedeCaster[StampedeCurrentIndex] = StampedeCaster[StampedeMaxIndex]
              • Set StampedeCasterPoint[StampedeCurrentIndex] = StampedeCasterPoint[StampedeMaxIndex]
              • Set StampedeTargetPoint[StampedeCurrentIndex] = StampedeTargetPoint[StampedeMaxIndex]
              • Set StampedeCounter[StampedeCurrentIndex] = StampedeCounter[StampedeMaxIndex]
              • Set StampedeCurrentLevel[StampedeCurrentIndex] = StampedeCurrentLevel[StampedeMaxIndex]
              • Set StampedeAngle[StampedeCurrentIndex] = StampedeAngle[StampedeMaxIndex]
              • Set StampedeMainCounter[StampedeCurrentIndex] = StampedeMainCounter[StampedeMaxIndex]
              • Set StampedeMainCounter2[StampedeCurrentIndex] = StampedeMainCounter2[StampedeMaxIndex]
              • Set StampedeMaxIndex = (StampedeMaxIndex - 1)
              • Trigger - Turn off (This trigger)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • StampedeMainCounter[StampedeCurrentIndex] Greater than or equal to StampedeBeastSpawnRate[StampedeCurrentLevel[StampedeCurrentIndex]]
                • Then - Actions
                  • Set StampedeMainCounter[StampedeCurrentIndex] = 0.00
                  • For each (Integer StampedeSpawnIndex) from 1 to StampedeBeastPerSec[StampedeCurrentLevel[StampedeCurrentIndex]], do (Actions)
                    • Loop - Actions
                      • Set StampedeMissileMaxIndex = (StampedeMissileMaxIndex + 1)
                      • Set StampedeCaster2[StampedeMissileMaxIndex] = StampedeCaster[StampedeCurrentIndex]
                      • Set StampedeAngle2[StampedeMissileMaxIndex] = StampedeAngle[StampedeCurrentIndex]
                      • Set StampedeLevel2[StampedeMissileMaxIndex] = StampedeCurrentLevel[StampedeCurrentIndex]
                      • Set StampedeBeastCollisionRadius[StampedeMissileMaxIndex] = StampedeBeastCollisionRadius[StampedeCurrentIndex]
                      • Set StampedeMaxRange[StampedeMissileMaxIndex] = StampedeMaxRange[StampedeCurrentIndex]
                      • Set StampedeDamage[StampedeMissileMaxIndex] = StampedeDamage[StampedeCurrentIndex]
                      • Set StampedeDummyPoint1[StampedeMissileMaxIndex] = (StampedeCasterPoint[StampedeCurrentIndex] offset by (Random real number between 100.00 and 400.00) towards StampedeAngle[StampedeMissileMaxIndex] degrees)
                      • Unit - Create 1 Stampede (Missile) for (Owner of StampedeCaster2[StampedeMissileMaxIndex]) at StampedeDummyPoint1[StampedeMissileMaxIndex] facing StampedeAngle[StampedeCurrentIndex] degrees
                      • Set StampedeDummy[StampedeMissileMaxIndex] = (Last created unit)
                      • Custom script: call RemoveLocation (udg_StampedeDummyPoint1[udg_StampedeMissileMaxIndex])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • StampedeMissileMaxIndex Greater than or equal to 1
                        • Then - Actions
                          • Trigger - Turn on Stampede Effect 2 <gen>
                        • Else - Actions
                • Else - Actions
  • Stampede Effect 2
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer StampedeMissileCurrentIndex) from 1 to StampedeMissileMaxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • StampedeCounter[StampedeMissileCurrentIndex] Greater than or equal to StampedeMaxRange[StampedeMissileCurrentIndex]
            • Then - Actions
              • Unit - Remove StampedeDummy[StampedeMissileCurrentIndex] from the game
              • Set StampedeCounter[StampedeMissileCurrentIndex] = 0.00
              • Custom script: call RemoveLocation (udg_StampedeDummyPoint2[udg_StampedeMissileCurrentIndex])
              • Custom script: call DestroyGroup(udg_StampedeGroup[udg_StampedeMissileCurrentIndex])
              • Custom script: call DestroyGroup(udg_StampedeDmgGroup[udg_StampedeMissileCurrentIndex])
              • Set StampedeCaster2[StampedeMissileCurrentIndex] = StampedeCaster2[StampedeMissileMaxIndex]
              • Set StampedeAngle2[StampedeMissileCurrentIndex] = StampedeAngle2[StampedeMissileMaxIndex]
              • Set StampedeDummy[StampedeMissileCurrentIndex] = StampedeDummy[StampedeMissileMaxIndex]
              • Set StampedeSpellDummy[StampedeMissileCurrentIndex] = StampedeSpellDummy[StampedeMissileMaxIndex]
              • Set StampedeCounter[StampedeMissileCurrentIndex] = StampedeCounter[StampedeMissileMaxIndex]
              • Set StampedeMissileCurrentIndex = StampedeMissileMaxIndex
              • Set StampedeMissileMaxIndex = (StampedeMissileMaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • StampedeMissileMaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off Stampede Effect 2 <gen>
                • Else - Actions
            • Else - Actions
              • Set StampedeDummyPoint2[StampedeMissileCurrentIndex] = (Position of StampedeDummy[StampedeMissileCurrentIndex])
              • Unit - Move StampedeDummy[StampedeMissileCurrentIndex] instantly to (StampedeDummyPoint2[StampedeMissileCurrentIndex] offset by 15.00 towards StampedeAngle2[StampedeMissileCurrentIndex] degrees)
              • Set StampedeCounter[StampedeMissileCurrentIndex] = (StampedeCounter[StampedeMissileCurrentIndex] + 15.00)
              • Set StampedeGroup[StampedeMissileCurrentIndex] = (Units within StampedeBeastCollisionRadius[StampedeMissileCurrentIndex] of StampedeDummyPoint2[StampedeMissileCurrentIndex] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)) and (((((Matching unit) i
              • Unit Group - Pick every unit in StampedeGroup[StampedeMissileCurrentIndex] and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (StampedeGroup[StampedeMissileCurrentIndex] is empty) Equal to False
                    • Then - Actions
                      • Unit Group - Add (Picked unit) to StampedeDmgGroup[StampedeMissileCurrentIndex]
                      • Unit - Cause StampedeCaster2[StampedeMissileCurrentIndex] to damage (Picked unit), dealing StampedeDamage[StampedeMissileCurrentIndex] damage of attack type Spells and damage type Normal
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • -------- --------
                      • Unit - Create 1 Dummy for (Owner of StampedeCaster2[StampedeMissileCurrentIndex]) at StampedeDummyPoint1[StampedeMissileCurrentIndex] facing Default building facing degrees
                      • Set StampedeSpellDummy[StampedeMissileCurrentIndex] = (Last created unit)
                      • Unit - Add a 1.00 second Generic expiration timer to StampedeSpellDummy[StampedeMissileCurrentIndex]
                      • Unit - Add Death Coil Cripple (Neutral Hostile) to StampedeSpellDummy[StampedeMissileCurrentIndex]
                      • Unit - Order StampedeSpellDummy[StampedeMissileCurrentIndex] to Undead Necromancer - Cripple (Picked unit)
                      • -------- --------
                    • Else - Actions
              • Custom script: call DestroyGroup(udg_StampedeGroup[udg_StampedeMissileCurrentIndex])
              • Custom script: call RemoveLocation (udg_StampedeDummyPoint2[udg_StampedeMissileCurrentIndex])
 

Attachments

  • New game tester2.w3x
    1.6 MB · Views: 26
  • New game tester2 (Update1).w3x
    1.6 MB · Views: 30
You write onto spellsetup variables as they were spellinstance data: StampedeDuration, StampedeMaxRange, and others. If one does that one has to make sure that the indexes never colide, as soon the array index used are coliding, you have a data lose/malfunction. Although in your test this won't happen cause the data is the same for all levels.

Make clear what belongs to the spell, the channeling or the missile and do only reindex the variables of that current type. In Channeling end: you should only reindex channeling variabels; in missle end you should only reindex missile variables. Spell Variables are not reindexed in normal cases.

The missile spawn uses a offset of random 1 to 400, you have to inser your spelldata variable somehow.
You have unused variables.

This action will end the current loop after this missile was reinidexed, skipping existing other missles (for 1/20 second in which they won't move) not really painful, but kinda ugly in the end result.
Set StampedeMissileCurrentIndex = StampedeMissileMaxIndex
 
Level 5
Joined
Apr 13, 2008
Messages
184
Yeah
You write onto spellsetup variables as they were spellinstance data: StampedeDuration, StampedeMaxRange, and others. If one does that one has to make sure that the indexes never colide, as soon the array index used are coliding, you have a data lose/malfunction. Although in your test this won't happen cause the data is the same for all levels.

Make clear what belongs to the spell, the channeling or the missile and do only reindex the variables of that current type. In Channeling end: you should only reindex channeling variabels; in missle end you should only reindex missile variables. Spell Variables are not reindexed in normal cases.

The missile spawn uses a offset of random 1 to 400, you have to inser your spelldata variable somehow.
You have unused variables.

This action will end the current loop after this missile was reinidexed, skipping existing other missles (for 1/20 second in which they won't move) not really painful, but kinda ugly in the end result.
Set StampedeMissileCurrentIndex = StampedeMissileMaxIndex

Yeah the spell looks ugly now so about the
Set StampedeMissileCurrentIndex = StampedeMissileMaxIndex? Can i just take it out? Im not sure why i have to set all the variables from current index to max index and have it decrease by 1. Is that to refresh the index? Kinda like reindexing

And there are a few things bothering me though.
1) The stampedes only come out on one side?
2) The damage loops every 0.05 seconds
3) It seems like the spell leaks, cause when i cast it two times sometimes the stampede comes out from the previous point of casting
 
Last edited:
Set StampedeMissileCurrentIndex = StampedeMissileMaxIndex? Can i just take it out? Im not sure why i have to set all the variables from current index to max index and have it decrease by 1. Is that to refresh the index? Kinda like reindexing
One writes the data of the max index to the current index, so that the max index takes over the index the current expired one used, that is done to keep the amount of active indexes low.
The reduction of the loop index by 1 is done to continue the work for other active missles in that loop and also affecting the reindexed one. When taking over the value of MissleMaxIndex you skip the loop afterwards.

The stampedes only come out on one side?
That is cause of the random beeing from 100 to 400 and the spawning angle is the same as the facing angle, if you want to mimic Stampede; you spawn the missiles in +90° to the facing so the missles spawn right and left from the caster. wiht - StampedeWidth to StampedeWidth

The damage loops every 0.05 seconds
That happens if StampedeDmgGroup[StampedeMissileCurrentIndex] is not existing, when it does not exist already damaged targets can not be saved and take damage again.
You have to create the damag group when shooting a missile.
  • Custom script: set udg_StampedeDmgGroup[udg_StampedeMissileMaxIndex] = CreateGroup()
 
Last edited:
Level 5
Joined
Apr 13, 2008
Messages
184
One writes the data of the max index to the current index, so that the max index takes over the index the current expired one used, that is done to keep the amount of active indexes low.
The reduction of the loop index by 1 is done to continue the work for other active missles in that loop and also affecting the reindexed one. When taking over the value of MissleMaxIndex you skip the loop afterwards.


That is cause of the random beeing from 100 to 400 and the spawning angle is the same as the facing angle, if you want to mimic Stampede; you spawn the missiles in +90° to the facing so the missles spawn right and left from the caster. wiht - StampedeWidth to StampedeWidth


That happens if StampedeDmgGroup[StampedeMissileCurrentIndex] is not existing, when it does not exist already damaged targets can not be saved and take damage again.
You have to create the damag group when shooting a missile.
  • Custom script: set udg_StampedeDmgGroup[udg_StampedeMissileMaxIndex] = CreateGroup()
Okay i think i got almost all of it down, i tried many methods to make the indexing work but it still doesnt, some stampede missile still disappears without moving all the way to its max range.

If the code below is not enough, I have upload another updated version. Thanks for helping me so much, really hope i can understand how to utilize MUI properly.

  • Stampede Effect
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer StampedeCurrentIndex) from 1 to StampedeMaxIndex, do (Actions)
        • Loop - Actions
          • Set StampedeMainCounter[StampedeCurrentIndex] = (StampedeMainCounter[StampedeCurrentIndex] + 0.05)
          • Set StampedeMainCounter2[StampedeCurrentIndex] = (StampedeMainCounter2[StampedeCurrentIndex] + 0.05)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • StampedeMainCounter2[StampedeCurrentIndex] Greater than or equal to StampedeDuration[StampedeCurrentLevel[StampedeCurrentIndex]]
            • Then - Actions
              • Custom script: call RemoveLocation (udg_StampedeCasterPoint[udg_StampedeCurrentIndex])
              • Custom script: call RemoveLocation (udg_StampedeTargetPoint[udg_StampedeCurrentIndex])
              • Set StampedeMainCounter[StampedeCurrentIndex] = 0.00
              • Set StampedeMainCounter2[StampedeCurrentIndex] = 0.00
              • Set StampedeCaster[StampedeCurrentIndex] = StampedeCaster[StampedeMaxIndex]
              • Set StampedeCasterPoint[StampedeCurrentIndex] = StampedeCasterPoint[StampedeMaxIndex]
              • Set StampedeTargetPoint[StampedeCurrentIndex] = StampedeTargetPoint[StampedeMaxIndex]
              • Set StampedeAngle[StampedeCurrentIndex] = StampedeAngle[StampedeMaxIndex]
              • Set StampedeMainCounter[StampedeCurrentIndex] = StampedeMainCounter[StampedeMaxIndex]
              • Set StampedeMainCounter2[StampedeCurrentIndex] = StampedeMainCounter2[StampedeMaxIndex]
              • Set StampedeCurrentIndex = StampedeMaxIndex
              • Set StampedeMaxIndex = (StampedeMaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • StampedeMaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • StampedeMainCounter[StampedeCurrentIndex] Greater than or equal to StampedeBeastSpawnRate[StampedeCurrentLevel[StampedeCurrentIndex]]
                • Then - Actions
                  • Set StampedeMainCounter[StampedeCurrentIndex] = 0.00
                  • For each (Integer StampedeSpawnIndex) from 1 to StampedeBeastPerSec[StampedeCurrentLevel[StampedeCurrentIndex]], do (Actions)
                    • Loop - Actions
                      • Set StampedeMissileMaxIndex = (StampedeMissileMaxIndex + 1)
                      • Set StampedeCaster2[StampedeMissileMaxIndex] = StampedeCaster[StampedeCurrentIndex]
                      • Set StampedeAngle2[StampedeMissileMaxIndex] = StampedeAngle[StampedeCurrentIndex]
                      • Set StampedeLevel2[StampedeMissileMaxIndex] = (Level of Stampede (Custom) for StampedeCaster2[StampedeMissileMaxIndex])
                      • Set StampedeBeastCollisionRadius2[StampedeMissileMaxIndex] = StampedeBeastCollisionRadius[StampedeLevel2[StampedeMissileMaxIndex]]
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • StampedeSpawnIndex Equal to 1
                        • Then - Actions
                          • Set StampedeDummyPointCaster = (Position of StampedeCaster2[StampedeMissileMaxIndex])
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 2) Equal to 1
                        • Then - Actions
                          • Set StampedeDummyPoint = (StampedeDummyPointCaster offset by (Random real number between 100.00 and StampedeWidth[StampedeLevel2[StampedeMissileMaxIndex]]) towards (StampedeAngle2[StampedeMissileMaxIndex] + 90.00) degrees)
                        • Else - Actions
                          • Set StampedeDummyPoint = (StampedeDummyPointCaster offset by (Random real number between 100.00 and StampedeWidth[StampedeLevel2[StampedeMissileMaxIndex]]) towards (StampedeAngle2[StampedeMissileMaxIndex] - 90.00) degrees)
                      • Unit - Create 1 Stampede (Missile) for (Owner of StampedeCaster2[StampedeMissileMaxIndex]) at StampedeDummyPoint facing StampedeAngle2[StampedeMissileMaxIndex] degrees
                      • Set StampedeDummy[StampedeMissileMaxIndex] = (Last created unit)
                      • Custom script: set udg_StampedeDmgGroup[udg_StampedeMissileMaxIndex] = CreateGroup()
                      • Custom script: call RemoveLocation (udg_StampedeDummyPoint)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • StampedeMissileMaxIndex Greater than or equal to 1
                        • Then - Actions
                          • Trigger - Turn on Stampede Effect 2 <gen>
                        • Else - Actions
                  • Custom script: call RemoveLocation (udg_StampedeDummyPointCaster)
                • Else - Actions
  • Stampede Effect 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer StampedeMissileCurrentIndex) from 1 to StampedeMissileMaxIndex, do (Actions)
        • Loop - Actions
          • Set StampedeDummyPoint2[StampedeMissileCurrentIndex] = (Position of StampedeDummy[StampedeMissileCurrentIndex])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • StampedeCounter[StampedeMissileCurrentIndex] Greater than or equal to StampedeMaxRange[StampedeLevel2[StampedeMissileCurrentIndex]]
                  • (Terrain pathing at StampedeDummyPoint2[StampedeMissileCurrentIndex] of type Walkability is off) Equal to True
            • Then - Actions
              • -------- Create Disappear SFX --------
              • Special Effect - Create a special effect at StampedeDummyPoint2[StampedeMissileCurrentIndex] using StampedeDisappearSFX
              • Special Effect - Destroy (Last created special effect)
              • Unit - Remove StampedeDummy[StampedeMissileCurrentIndex] from the game
              • -------- --------
              • Set StampedeCounter[StampedeMissileCurrentIndex] = 0.00
              • Custom script: call RemoveLocation (udg_StampedeDummyPoint2[udg_StampedeMissileCurrentIndex])
              • Custom script: call DestroyGroup(udg_StampedeGroup[udg_StampedeMissileCurrentIndex])
              • Custom script: call DestroyGroup(udg_StampedeDmgGroup[udg_StampedeMissileCurrentIndex])
              • -------- --------
              • Set StampedeCaster2[StampedeMissileCurrentIndex] = StampedeCaster2[StampedeMissileMaxIndex]
              • Set StampedeAngle2[StampedeMissileCurrentIndex] = StampedeAngle2[StampedeMissileMaxIndex]
              • Set StampedeDummy[StampedeMissileCurrentIndex] = StampedeDummy[StampedeMissileMaxIndex]
              • Set StampedeSpellDummy[StampedeMissileCurrentIndex] = StampedeSpellDummy[StampedeMissileMaxIndex]
              • Set StampedeCounter[StampedeMissileCurrentIndex] = StampedeCounter[StampedeMissileMaxIndex]
              • Set StampedeLevel2[StampedeMissileCurrentIndex] = StampedeLevel2[StampedeMissileMaxIndex]
              • Set StampedeGroup[StampedeMissileCurrentIndex] = StampedeGroup[StampedeMissileMaxIndex]
              • Set StampedeDmgGroup[StampedeMissileCurrentIndex] = StampedeDmgGroup[StampedeMissileMaxIndex]
              • Set StampedeMissileCurrentIndex = StampedeMissileMaxIndex
              • Set StampedeMissileMaxIndex = (StampedeMissileMaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • StampedeMissileMaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off Stampede Effect 2 <gen>
                • Else - Actions
            • Else - Actions
              • Unit - Move StampedeDummy[StampedeMissileCurrentIndex] instantly to (StampedeDummyPoint2[StampedeMissileCurrentIndex] offset by StampedeSpeed[StampedeLevel2[StampedeMissileCurrentIndex]] towards StampedeAngle2[StampedeMissileCurrentIndex] degrees)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • StampedeDestroyTreesBool Equal to True
                • Then - Actions
                  • Destructible - Pick every destructible within 80.00 of StampedeDummyPoint2[StampedeMissileCurrentIndex] and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                • Else - Actions
              • Set StampedeCounter[StampedeMissileCurrentIndex] = (StampedeCounter[StampedeMissileCurrentIndex] + StampedeSpeed[StampedeLevel2[StampedeMissileCurrentIndex]])
              • Set StampedeGroup[StampedeMissileCurrentIndex] = (Units within StampedeBeastCollisionRadius2[StampedeMissileCurrentIndex] of StampedeDummyPoint2[StampedeMissileCurrentIndex] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)) and (((((Matching unit)
              • Unit Group - Pick every unit in StampedeGroup[StampedeMissileCurrentIndex] and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (StampedeGroup[StampedeMissileCurrentIndex] is empty) Equal to False
                    • Then - Actions
                      • Unit Group - Add (Picked unit) to StampedeDmgGroup[StampedeMissileCurrentIndex]
                      • Unit - Cause StampedeCaster2[StampedeMissileCurrentIndex] to damage (Picked unit), dealing StampedeDamage[StampedeLevel2[StampedeMissileCurrentIndex]] damage of attack type Spells and damage type Normal
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using StampedeDamageSFX
                      • Special Effect - Destroy (Last created special effect)
                      • -------- --------
                      • Unit - Create 1 Dummy for (Owner of StampedeCaster2[StampedeMissileCurrentIndex]) at StampedeDummyPoint2[StampedeMissileCurrentIndex] facing Default building facing degrees
                      • Set StampedeSpellDummy[StampedeMissileCurrentIndex] = (Last created unit)
                      • Unit - Add a 1.00 second Generic expiration timer to StampedeSpellDummy[StampedeMissileCurrentIndex]
                      • Unit - Add Death Coil Cripple (Neutral Hostile) to StampedeSpellDummy[StampedeMissileCurrentIndex]
                      • Unit - Order StampedeSpellDummy[StampedeMissileCurrentIndex] to Undead Necromancer - Cripple (Picked unit)
                      • -------- --------
                    • Else - Actions
              • Custom script: call DestroyGroup(udg_StampedeGroup[udg_StampedeMissileCurrentIndex])
              • Custom script: call RemoveLocation (udg_StampedeDummyPoint2[udg_StampedeMissileCurrentIndex])
 
Status
Not open for further replies.
Top