1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. The poll for our 11th Music Contest is up! Help us choose the most awesome cinematic tracks by casting a vote!
    Dismiss Notice
  3. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  4. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  5. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice

Chaos Meteor v1.3.3

Submitted by NightStalker
This bundle is marked as approved. It works and satisfies the submission rules.
UPDATED: A meteor is created above the target location and it falls down until it meets the ground. While the meteor is falling, a fire ball moves in the effect range of the spell's current level in a circular motion. Then the meteor explodes and damages every enemy alive unit in an area, kills any trees.

The spell has 3 levels;
Level1 : 200 damage 300 AoE
Level2 : 300 damage 350 AoE
Level3 : 400 damage 400 AoE

Triggers


Configuration
  • CMSS Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set CMSS_AbilityID = Chaos Meteor
      • Set CMSS_StartingHeight = 1000.00
      • Set CMSS_FallingSpeed = (800.00 x 0.03)
      • -------- ----------Damage Depending on Level---------- --------
      • Set CMSS_Damage[1] = 200.00
      • Set CMSS_Damage[2] = 300.00
      • Set CMSS_Damage[3] = 400.00
      • -------- ----------AoE per level------------- --------
      • Set CMSS_AoE[1] = 300.00
      • Set CMSS_AoE[2] = 350.00
      • Set CMSS_AoE[3] = 400.00
      • -------- ----------Creating the Peasant to harvest the trees---------- --------
      • Custom script: set udg_CMSS_TreeDestroyer = CreateUnit (Player(15), 'hpea', 0,0,0)
      • Custom script: call UnitAddAbility(udg_CMSS_TreeDestroyer, 'Aloc')
      • Unit - Hide CMSS_TreeDestroyer
      • -------- Dummy Unit Types --------
      • Set CMSS_DummySpinType = CMSS_SpinDummy
      • Set CMSS_DummyMeteor = CMSS_DummyBigMeteor
      • -------- Special Effects --------
      • Set CMSS_Effect1 = Units\NightElf\Wisp\WispExplode.mdl
      • Set CMSS_Effect2 = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • -------- ---------Damage and Attack Type--------- --------
      • Set CMSS_AttackType = Chaos
      • Set CMSS_DamageType = Death
      • -------- ---------Some Conditions for the spell--------- --------
      • Set CMSS_Conditions[1] = ((Picked unit) is alive)


Execution
  • CMSS Execution
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to CMSS_AbilityID
    • Actions
      • Set CMSS_Index = (CMSS_Index + 1)
      • Set CMSS_Caster[CMSS_Index] = (Triggering unit)
      • Set CMSS_CurrentLvL[CMSS_Index] = (Level of CMSS_AbilityID for CMSS_Caster[CMSS_Index])
      • Set CMSS_tempLoc1 = (Target point of ability being cast)
      • -------- Creating the meteor --------
      • Unit - Create 1 CMSS_DummyMeteor for (Owner of CMSS_Caster[CMSS_Index]) at CMSS_tempLoc1 facing Default building facing degrees
      • Set CMSS_Dummy[CMSS_Index] = (Last created unit)
      • -------- creating the spin dummy --------
      • Set CMSS_tempLoc2 = (CMSS_tempLoc1 offset by CMSS_AoE[CMSS_CurrentLvL[CMSS_Index]] towards 0.00 degrees)
      • Unit - Create 1 CMSS_DummySpinType for (Owner of CMSS_Caster[CMSS_Index]) at CMSS_tempLoc2 facing Default building facing degrees
      • Set CMSS_SpinDummy[CMSS_Index] = (Last created unit)
      • -------- ----------------- --------
      • -------- The Angle and height for the movements of the two dummies --------
      • Set CMSS_SpinAngle[CMSS_Index] = (Angle from CMSS_tempLoc1 to CMSS_tempLoc2)
      • Set CMSS_Height[CMSS_Index] = CMSS_StartingHeight
      • Animation - Change CMSS_Dummy[CMSS_Index] flying height to CMSS_Height[CMSS_Index] at 0.00
      • -------- Create the damage group(to store the already damaged units in it) --------
      • Custom script: call RemoveLocation(udg_CMSS_tempLoc1)
      • Custom script: call RemoveLocation(udg_CMSS_tempLoc2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CMSS_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on CMSS Loop <gen>
        • Else - Actions


Loop
  • CMSS Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CMSS_LoopInteger) from 1 to CMSS_Index, do (Actions)
        • Loop - Actions
          • -------- The meteor is falling from the sky but in game terms its location is stable at one point --------
          • -------- to easily take a base to the spin dummy i set the base of the circle to the meteor point --------
          • -------- This block moves the spinning dummy in a circular motion to show how much area the spell would affect --------
          • Set CMSS_tempLoc1 = (Position of CMSS_Dummy[CMSS_LoopInteger])
          • Set CMSS_SpinAngle[CMSS_LoopInteger] = (CMSS_SpinAngle[CMSS_LoopInteger] + 10.80)
          • Set CMSS_tempLoc2 = (CMSS_tempLoc1 offset by CMSS_AoE[CMSS_CurrentLvL[CMSS_LoopInteger]] towards CMSS_SpinAngle[CMSS_LoopInteger] degrees)
          • Unit - Move CMSS_SpinDummy[CMSS_LoopInteger] instantly to CMSS_tempLoc2
          • -------- ----------------------------------- --------
          • -------- This code block descends the meteor in the meantime --------
          • Set CMSS_Height[CMSS_LoopInteger] = (CMSS_Height[CMSS_LoopInteger] - CMSS_FallingSpeed)
          • Animation - Change CMSS_Dummy[CMSS_LoopInteger] flying height to CMSS_Height[CMSS_LoopInteger] at 0.00
          • Custom script: call RemoveLocation(udg_CMSS_tempLoc1)
          • Custom script: call RemoveLocation(udg_CMSS_tempLoc2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CMSS_Height[CMSS_LoopInteger] Less than or equal to 0.00
            • Then - Actions
              • Set CMSS_tempLoc1 = (Position of CMSS_Dummy[CMSS_LoopInteger])
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within CMSS_AoE[CMSS_CurrentLvL[CMSS_LoopInteger]] of CMSS_tempLoc1) and do (Actions)
                • Loop - Actions
                  • Set CMSS_tempUnit = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (CMSS_tempUnit is alive) Equal to True
                      • (CMSS_tempUnit belongs to an ally of (Owner of CMSS_Caster[CMSS_LoopInteger])) Equal to False
                      • ((Unit-type of CMSS_tempUnit) is Magic Immune) Equal to False
                    • Then - Actions
                      • Unit - Cause CMSS_Caster[CMSS_LoopInteger] to damage CMSS_tempUnit, dealing CMSS_Damage[CMSS_CurrentLvL[CMSS_LoopInteger]] damage of attack type CMSS_AttackType and damage type CMSS_DamageType
                    • Else - Actions
              • Destructible - Pick every destructible within CMSS_AoE[CMSS_CurrentLvL[CMSS_LoopInteger]] of CMSS_tempLoc1 and do (Actions)
                • Loop - Actions
                  • Set CMSS_tempDestructible = (Picked destructible)
                  • Unit - Order CMSS_TreeDestroyer to Harvest CMSS_tempDestructible
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Current order of CMSS_TreeDestroyer) Equal to (Order(harvest))
                    • Then - Actions
                      • Destructible - Kill CMSS_tempDestructible
                    • Else - Actions
                  • Unit - Order CMSS_TreeDestroyer to Stop
              • Special Effect - Create a special effect at CMSS_tempLoc1 using CMSS_Effect1
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at CMSS_tempLoc1 using CMSS_Effect2
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation(udg_CMSS_tempLoc1)
              • Custom script: call RemoveLocation(udg_CMSS_tempLoc2)
              • Unit - Kill CMSS_Dummy[CMSS_LoopInteger]
              • Unit - Kill CMSS_SpinDummy[CMSS_LoopInteger]
              • Set CMSS_Caster[CMSS_LoopInteger] = CMSS_Caster[CMSS_Index]
              • Set CMSS_Dummy[CMSS_LoopInteger] = CMSS_Dummy[CMSS_Index]
              • Set CMSS_Height[CMSS_LoopInteger] = CMSS_Height[CMSS_Index]
              • Set CMSS_SpinAngle[CMSS_LoopInteger] = CMSS_SpinAngle[CMSS_Index]
              • Set CMSS_SpinDummy[CMSS_LoopInteger] = CMSS_SpinDummy[CMSS_Index]
              • Set CMSS_CurrentLvL[CMSS_LoopInteger] = CMSS_CurrentLvL[CMSS_Index]
              • Set CMSS_Index = (CMSS_Index - 1)
              • Set CMSS_LoopInteger = (CMSS_LoopInteger - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CMSS_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions




How to import

First of all, go to "File -> Preferences" and check the box for "Automatically create unknown variables while pasting trigger data". Before copy pasting the spell triggers, copy and past the objects into your map first.

Units:
"CM_DummyBigChaos"
"CM_SecondDummy"

Abilities:
"Chaos Meteor"

Now you can copy and paste the triggers into your map.
And you are good to go!!


Additional info: I don't really think this spell is so unique though I wanted to upload this so people can use this when they need something like this.

All the help is from the Hive forums thanks for everyone who helped me learn the GUI and MUI systems :)

And special thanks to;

Custom Projectiles System
by leonguyen112

Visualize: Dynamic Indexing
by PurgeandFire

And a map explaining the MUI and GUI things
by pOke


Changelog:

-added one pointer variable again
-added sound effect
-----------------------------------
-Removed unnecessary additional point variables
-removed unnecessary unit group
-changed configuration event to "map init" from "elapsed time .5"
-----------------------------------
-Removed the sound
-Added level of ability variable
-Got rid of unit group leak
-Added a few variables also to make the changes easier for users
-----------------------------------
-Removed some leaks
-----------------------------------
-Changed prefix
-Added configurable dummy unit types


Keywords:
Meteor, Circular Movement, AoE Spell, Fire Spell, Chaos
Contents

Chaos Meteor V1.3.3 (Map)

Reviews
KILLCIDE
Needs Fixed Nothing Suggestions Periodic timer should be configurable SpinAngle should be configurable Instead of using RemoveLocation on tempLoc2, and then storing the position of the dummy unit in tempLoc1 directly after, just keep using tempLoc2...
  1. 12th Dec 2015
    IcemanBo: For long time as NeedsFix. Rejected.

    14:07, 2nd Jan 2015
    Maker: Check my reply in this thread.

    old reviews

    11:02, 23th Apr 2014
    BPower:

    - The configuration Trigger could run on map initialization.
    - You use CM_temploc1, 2 and CM_SpinDummyLocion as location variables, while one would be enough to handle every location needed in the spell.
    - The variable CM_DamageGroup is not used, still it is part of the loop. Please remove it.

    23:48, 7th Feb 2014
    You created some new issues
    09:14, 3rd Feb 2014
    BPower:
    • You leak a unit group.
    • For logical reasons you should normally assign a purpose to index 0, but it is simply inefficient here. So start with 1 for ability level 1 -- > Set CM_Damage[1] = 200.00 and not Set CM_Damage[0] = 200.00 in the configuration.
      This way you will get rid of the arithmetic --> (CM_Damage[LVL] - 1).
    • Store the ability level into a variable.
    • The wisp explosion effect, could be shown even if you don't hit any target.
      Also it should be configurable.
    • The shockwave sound is an overkill, the used effects already have sounds that fit.
    • tempUnit, tempLoc, ... should have the prefix CM_
    • Damagetype and attacktype should be configurable.
     
  2. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    You should implement a configuration trigger which runs once on map init.
    Set variables like ability id, dummy, damage(level based), falling speed, aoe, effects, starting fly height ... to the desired default values.
    This is important for proper and easy user configuration.

    You kill a so called SpinDummy[index]. There is no unit set to that variable.
    Talking about variables, you should label them like this: CM_Xxxx --> CM_Caster (for Chaos Meteor caster) so they do not interfere with other map code.

    I'm not a fan of terrain deformations as they remain as permanent leak in data, but it fits to your concept, still you don't have to add a new trigger for it.
    Just create the deformation at the end of the loop, once you killed the meteor dummy.
     
  3. NightStalker

    NightStalker

    Joined:
    Apr 21, 2013
    Messages:
    1,127
    Resources:
    5
    Icons:
    4
    Spells:
    1
    Resources:
    5
    Firstly about that spin dummy I was trying something and I changed my mind that's left from before.

    Secondly, for the configuration I'll start it now and update ASAP. Thanks for feedback :)
     
  4. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,547
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    You need to add a configuration trigger to this spell, damage, special effects and such should all be configurable. Your spell must also support multiple levels to abide by the site rules. You leak a unit group.

    You need a tree filter, currently it'll destroy bridges as well which are a big no.
    Really there should not be terrain deformations - I've not seen them present in any decent spells purely because they leak memory, fit concept or not, leaks are not allowed. Not sure how I feel about playing the sound, probably shouldn't be there.

    Just a few pointers for now

    Edit: also the map needs a proper name (the downloaded one) not just MUISpellTest3
     
  5. NightStalker

    NightStalker

    Joined:
    Apr 21, 2013
    Messages:
    1,127
    Resources:
    5
    Icons:
    4
    Spells:
    1
    Resources:
    5
    Hope that now it fits every rule :) and i removed the terrain deformation for performance issues and you said it leaked. And added a more artistic fire ball thing :D Hope you like this time
     
  6. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    5,854
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    • 'THEN'-Aktionen
      • Set tempLoc1 = (Position of (Dying unit))
      • Spezialeffekt - Create a special effect at tempLoc1 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Spezialeffekt - Destroy (Last created special effect)
      • Sound - Play Shockwave <gen> at 100.00% volume, located at tempLoc1 with Z offset 0.00
      • Custom script: call RemoveLocation(udg_tempLoc1)

    ^No need for an extra trigger for this maybe? You could just move the actions tp the deindex part of your loop, or?

    I only tested it shortly, but seems a lot better than last time I saw code :thumbs_up:
     
  7. NightStalker

    NightStalker

    Joined:
    Apr 21, 2013
    Messages:
    1,127
    Resources:
    5
    Icons:
    4
    Spells:
    1
    Resources:
    5
    Thanks :D i updated it so the extra trigger is gone. Posted the triggers on here too so everyone can view without downloading :)
     
  8. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    For logical reasons you should assign a purpose to index 0, but it is simply inefficient here. So start with -- > Set CM_Damage[1] = 200.00 and not Set CM_Damage[0] = 200.00
    So you don't have to do (CM_Damage[LVL] - 1).

    Also store the level into a variable on spell cast.
     
  9. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,311
    Resources:
    22
    Packs:
    1
    Maps:
    8
    Spells:
    12
    Tutorials:
    1
    Resources:
    22
    If you wish to add deformations, give a Boolean that can be configured, then a comment warning users that if you set the Boolean to true, you will get deformation effect but risks get lagging maps.
     
  10. NightStalker

    NightStalker

    Joined:
    Apr 21, 2013
    Messages:
    1,127
    Resources:
    5
    Icons:
    4
    Spells:
    1
    Resources:
    5
    i changed the array issues, and i changed my mind about the deformation for performance and leak issues made it more simple too. I'm gonna try for a fire mage spell pack hope it'll be good. I also created my very own first custom model too :D I'll post the updates of this spell in a few days :)
     
  11. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,163
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    - the damage group filtering is not necesary actualy because the ability stopped after the first hit..
    - you dont need to remove temploc1 after the meteor hits the ground
    - misplaced add unit to damage group. put it inside the picking action
    - the damage group leaked. because you always create a new group at the last index without destroying it at the end
     
  12. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    • Custom script: set bj_wantDestroyGroup = true
    has to be right above the group which should be destroyed, because it applies for any next group enumaration not only in your trigger.
    Code (vJASS):
    function ForGroupBJ takes group whichGroup, code callback returns nothing
        // If the user wants the group destroyed, remember that fact and clear
        // the flag, in case it is used again in the callback.
        local boolean wantDestroy = bj_wantDestroyGroup
        set bj_wantDestroyGroup = false//<-- !!!!!!!!!!!!!

        call ForGroup(whichGroup, callback)

        // If the user wants the group destroyed, do so now.
        if (wantDestroy) then
            call DestroyGroup(whichGroup)
        endif
    endfunction


    You don't need this group, because the meteor doesn't deal damage over time. Just delete it and all checks related to it.
    • Unit Group - Add tempUnit to CM_DamageGroup[CM_LoopInteger]

    You don't have to: Custom script: call RemoveLocation(udg_CM_tempLoc1) after meteor hits. This location doesn't even exist.
     
    Last edited: Feb 7, 2014
  13. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    710
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Delete this:
    • Custom script: call UnitAddAbility(udg_CM_TreeDestroyer, 'Aloc')

    And add locust to the dummy via OE.
     
  14. NightStalker

    NightStalker

    Joined:
    Apr 21, 2013
    Messages:
    1,127
    Resources:
    5
    Icons:
    4
    Spells:
    1
    Resources:
    5
    I didnt want to change the peasant unit from default or create another custom unit for that thats why i gave the ability later to it
     
  15. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    710
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    What if the "default" peasant unit starts to attack other units for an unknown reason? I think you should create a new unit.:wink:
     
  16. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,311
    Resources:
    22
    Packs:
    1
    Maps:
    8
    Spells:
    12
    Tutorials:
    1
    Resources:
    22
    He won't, because he's Neutral Passive(was it Passive/Extra?)
    It's been a common practice for detecting trees over the years for GUI and JASS triggering.
    Also, you should add the Harvest ability w/ custom script (forget what's the id, check OE), in case player change their peasant and delete that skill.
     
  17. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    -Possibly improve the tooltip, fix the hotkey text.
    -Possibly add casting sound.
    -The rotating projectile is created at 0 degrees, but the spin angle can be whatever. So the projectile jumps from the place it is created to the spin angle during the first loop. Create the unit at the first spin angle.
    -The cast trigger has two leaks, you overwrite the temp loc and you use Target point of ability beinc cast and not the variable. Looping trigger also overwrites.
    -Dummies should be set to Can't raise, does not decay and have little to no vision.

    Needs Fix
     
  18. NightStalker

    NightStalker

    Joined:
    Apr 21, 2013
    Messages:
    1,127
    Resources:
    5
    Icons:
    4
    Spells:
    1
    Resources:
    5
    Firstly, thanks for reviewing my spell and for the feedback.

    I have some questions about these though.

    -WHat do you mean by casting sound? Is it a sound effect when casting the spell?

    -To be honest, I didnt understand the problem about the degrees :D

    -For the point leaks, BPower reviewed this spell months ago, and said that all these could be stored into only one point instead of three or two. I guess I have done wrong or this needs two point variables if I get it right?

    -Vision is determined by acqusition range, isnt it?
     
  19. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    A sound when the spell is cast, yes.

    You create the projectile that spins with offset (a, 0). The angle is always 0 from target point.
    The first offset angle for the looping trigger is always the opposite angle. It is always 180.
    The angles should be the same.

    You need two location variables.

    Vision is not determined by acquisition range. They are connected when detecting enemies that come into range. The dummies however do not attack anything so we can ignore acquisition range.
    Reduce the vision of the dummies, they give as much vision as normal units currently.