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

Death Star V1.2 [MUI]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Death Star V1.2 [MUI]
Created by Destination9747
227547-albums6710-picture78881.jpg

Spell Description: It will open a star shape doom portal and will slow attack and movement speed of nearby enemies in 500 AOE and damage nearby enemies in 200 range.

Level 1: 10% AS, 5% MS, 50 Damage
Level 2: 18% AS, 10% MS, 100 Damage
Level 3: 26% AS, 15% MS, 150 Damage
Level 4: 34% AS, 20% MS, 200 Damage
Level 5: 42% AS, 25% MS, 250 Damage



Needs Unit Indexer



V1.0

Spell Made
V1.1

Made many things configurable
Used a custom integer value instead of "Integer A"
Controlled turning the loop trigger on
Added a sound to the spell
Spell based on channel
Facing of the caster stored in to a variable
Changed number of dummies created to 1
V1.2

Special Effects changed
Added damage to the spell
Fixed some leaks
Added Recycling Dummy Units



  • Death Star Cast
    • Death Star Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Death Star
    • Actions
      • Set DS_Caster = (Triggering unit)
      • Set DS_ID = (Custom value of DS_Caster)
      • Set DS_Caster_Location = (Position of DS_Caster)
      • Set DS_Time[DS_ID] = 0.50
      • Set DS_Level = (Level of Death Star for DS_Caster)
      • Set DS_SpecialEffect = Abilities\Weapons\BansheeMissile\BansheeMissile.mdl
      • Set DS_LightningModel = Drain Life
      • Set DS_CasterFace = (Facing of DS_Caster)
      • Set DS_Damage = (50.00 x (Real(DS_Level)))
      • Set DS_Secondary_Damage_Range = 200.00
      • -------- Lightnings 1 --------
      • Set DS_Point2 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x 1.00))) degrees)
      • Set DS_Point3 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x (1.00 + 2.00)))) degrees)
      • Lightning - Create a DS_LightningModel lightning effect from source DS_Point2 to target DS_Point3
      • Set DS_Lightning1[DS_ID] = (Last created lightning effect)
      • Custom script: call RemoveLocation(udg_DS_Point2)
      • Custom script: call RemoveLocation(udg_DS_Point3)
      • -------- Lightnings 2 --------
      • Set DS_Point2 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x 2.00))) degrees)
      • Set DS_Point3 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x (2.00 + 2.00)))) degrees)
      • Lightning - Create a DS_LightningModel lightning effect from source DS_Point2 to target DS_Point3
      • Set DS_Lightning2[DS_ID] = (Last created lightning effect)
      • Custom script: call RemoveLocation(udg_DS_Point2)
      • Custom script: call RemoveLocation(udg_DS_Point3)
      • -------- Lightnings 3 --------
      • Set DS_Point2 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x 3.00))) degrees)
      • Set DS_Point3 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x (3.00 + 2.00)))) degrees)
      • Lightning - Create a DS_LightningModel lightning effect from source DS_Point2 to target DS_Point3
      • Set DS_Lightning3[DS_ID] = (Last created lightning effect)
      • Custom script: call RemoveLocation(udg_DS_Point2)
      • Custom script: call RemoveLocation(udg_DS_Point3)
      • -------- Lightnings 4 --------
      • Set DS_Point2 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x 4.00))) degrees)
      • Set DS_Point3 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x (4.00 - 3.00)))) degrees)
      • Lightning - Create a DS_LightningModel lightning effect from source DS_Point2 to target DS_Point3
      • Set DS_Lightning4[DS_ID] = (Last created lightning effect)
      • Custom script: call RemoveLocation(udg_DS_Point2)
      • Custom script: call RemoveLocation(udg_DS_Point3)
      • -------- Lightnings 5 --------
      • Set DS_Point2 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x 5.00))) degrees)
      • Set DS_Point3 = (DS_Caster_Location offset by 500.00 towards (DS_CasterFace + (36.00 + (72.00 x (5.00 - 3.00)))) degrees)
      • Lightning - Create a DS_LightningModel lightning effect from source DS_Point2 to target DS_Point3
      • Set DS_Lightning5[DS_ID] = (Last created lightning effect)
      • Custom script: call RemoveLocation(udg_DS_Point2)
      • Custom script: call RemoveLocation(udg_DS_Point3)
      • Unit Group - Add DS_Caster to DS_UnitGroup
      • For each (Integer DS_CustomInteger) from 1 to 180, do (Actions)
        • Loop - Actions
          • Set DS_Point2 = (DS_Caster_Location offset by 500.00 towards ((2.00 x (Real(DS_CustomInteger))) + 2.00) degrees)
          • Special Effect - Create a special effect at DS_Point2 using DS_SpecialEffect
          • Special Effect - Destroy (Last created special effect)
      • -------- Dummy Cast Slow --------
      • Unit - Create 1 Death Star Dummy for (Owner of DS_Caster) at DS_Caster_Location facing Default building facing degrees
      • Set DS_Dummy = (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to DS_Dummy
      • Unit - Add Death Star Slow to DS_Dummy
      • Unit - Set level of Death Star Slow for DS_Dummy to DS_Level
      • Unit - Order DS_Dummy to Human Mountain King - Thunder Clap
      • -------- 200 Range Damage --------
      • Set DS_UnitGroup_Damage = (Units within DS_Secondary_Damage_Range of DS_Caster_Location matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to
      • Unit Group - Pick every unit in DS_UnitGroup_Damage and do (Actions)
        • Loop - Actions
          • Set DS_DamageTarget = (Picked unit)
          • Unit - Cause DS_Caster to damage DS_DamageTarget, dealing DS_Damage damage of attack type Spells and damage type Magic
      • -------- Clear Leaks --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Death Star Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Death Star Loop <gen>
        • Else - Actions
      • Custom script: call DestroyGroup(udg_DS_UnitGroup_Damage)
      • Custom script: call RemoveLocation(udg_DS_Caster_Location)
      • Custom script: call RemoveLocation(udg_DS_Point2)
      • Custom script: call RemoveLocation(udg_DS_Point3)
  • Death Star Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DS_UnitGroup and do (Actions)
        • Loop - Actions
          • Set DS_Caster2 = (Picked unit)
          • Set DS_ID2 = (Custom value of DS_Caster2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DS_Time[DS_ID2] Greater than or equal to 0.00
            • Then - Actions
              • Set DS_Time[DS_ID2] = (DS_Time[DS_ID2] - 0.03)
            • Else - Actions
              • Lightning - Destroy DS_Lightning1[DS_ID2]
              • Lightning - Destroy DS_Lightning2[DS_ID2]
              • Lightning - Destroy DS_Lightning3[DS_ID2]
              • Lightning - Destroy DS_Lightning4[DS_ID2]
              • Lightning - Destroy DS_Lightning5[DS_ID2]
              • Lightning - Destroy DS_Lightning6[DS_ID2]
              • Unit Group - Remove DS_Caster2 from DS_UnitGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in DS_UnitGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions



Keywords:
Death, Star, Dead, Rise, Slow, Orb, Portal, Demon, Devil, Satan, Doom, Slower, Lord, Moon, Sun, Green, Kill, Die
Contents

Death Star V1.2 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 13:41, 11th Feb 2014 BPower: You have 179 locations leaks per cast. Stuff like lightning model, offset, effects, duration, etc should be configurable in a seperated trigger Why is...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

13:41, 11th Feb 2014
BPower:
  • You have 179 locations leaks per cast.
  • Stuff like lightning model, offset, effects, duration, etc should be configurable in a seperated trigger
  • Why is DamageEngine imported into the demo map? It shouldn't be there
  • Numbers of created effetcs could be configurable. That would require a little math to determine the correct space between the each sfx.
  • Effects could be much smoother, for instance the lightinig could fade out...
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
- Used effects, aoe, lightning model, duration ... should be configurable
- Don't use for integer A, use a custom integer variable.
- The looping trigger is started on every cast, even if it is already enabled.
- While the effects look interesting the rest is quite boring (Sounds, ...)
- Base your spell on Channel not on Warstomp.
- Facing of unit could be saved into a variable.
- Use only one dummy to apply cripple per gamel or at least only one per cast.
- The spell requires an UnitIndexer, you might want to add that info into the description here.

Don't be discouraged those changes can be done quickly. :)
 
  • Custom script: call DestroyGroup(udg_DS_UnitGroup_Slow)
^Seems to be useless for me. Maybe you forgot to remove it after some changes?

Usage of loop for the lightning stuff would look bit more neat maybe, but it's just my opinion. You can do how you want.

You leak locations. Free memory only at bottom of trigger is not enough. You have to ensure you remove the location before you give a new value to the variable.

So if you set "Point = Value" and after some lines you need a new value for "Point", you must free the memory before. Doing so once at the end of trigger is not enough here.

In your loop, if you would set "DS_Caster2 = null" you could simply check if "DS_Caster2 = null" to turn off the trigger instead of counting units in unitgroup. (is faster I think)

  • Unit Group - Pick every unit in DS_UnitGroup and do (Actions)
    • Schleifen - Aktionen
      • Set DS_Caster2 = (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • DS_Caster2 == No Unit
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Set DS_ID2 = (Custom value of DS_Caster2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DS_Time[DS_ID2] >= 0.00
            • Then - Actions
              • Set DS_Time[DS_ID2] = (DS_Time[DS_ID2] - 0.03)
            • Else - Actions
              • Lightning - Destroy DS_Lightning1[DS_ID2]
              • Lightning - Destroy DS_Lightning2[DS_ID2]
              • Lightning - Destroy DS_Lightning3[DS_ID2]
              • Lightning - Destroy DS_Lightning4[DS_ID2]
              • Lightning - Destroy DS_Lightning5[DS_ID2]
              • Lightning - Destroy DS_Lightning6[DS_ID2]
              • Unit Group - Remove DS_Caster2 from DS_UnitGroup
      • Set DS_Caster2 = No unit
 
The star ought to be made through a loop - it'd cut down the lines of code and generally be a lot neater

I also feel that there is a lack of real effect to the spell - an object data based damage/slow/whatever is really rather simplistic and I think more could be done with the concept. Especially given how common "Star" shaped spells are.

I would suggest removing the dummy unit after it dies and prehaps recycling - You leave a lot of data floating around after the spell has ended
 
  • Set DS_Time[DS_ID] = 0.50
  • Set DS_LightningModel = Drain Life
  • Set DS_SpecialEffect = Abilities\Weapons\BansheeMissile\BansheeMissile.mdl
^Could be in Init trigger.

Following is maybe not needed:
  • Lightning - Destroy DS_Lightning6[DS_ID2]
No need to use a unit variable here:
  • Unit Group - Pick every unit in DS_UnitGroup_Damage and do (Actions)
    • Loop - Actions
      • Set DS_DamageTarget = (Picked unit)
      • Unit - Cause DS_Caster to damage DS_DamageTarget, dealing DS_Damage damage of attack type Spells and damage type Magic
"DS_Time[DS_ID2] Greater than OR equal to 0.00" -- > "DS_Time[DS_ID2] < 0" --> Change Then/Else actions

No need of 2 comparrisons if one could be enough.
 
Top