- 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.
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
- -------- --------
-
Events
-
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
-
If - Conditions
-
Events
-
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
-
If - Conditions
-
Loop - Actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Loop - Actions
-
For each (Integer StampedeCurrentIndex) from 1 to StampedeMaxIndex, do (Actions)
-
Events
-
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
-
If - Conditions
-
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
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_StampedeGroup[udg_StampedeMissileCurrentIndex])
- Custom script: call RemoveLocation (udg_StampedeDummyPoint2[udg_StampedeMissileCurrentIndex])
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer StampedeMissileCurrentIndex) from 1 to StampedeMissileMaxIndex, do (Actions)
-
Events