Chaos Meteor v1.3.3

This bundle is marked as approved. It works and satisfies the submission rules.
  • Like
Reactions: deepstrasz
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



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



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



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

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.

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


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.
 
Level 18
Joined
Mar 18, 2012
Messages
1,717
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.
 

Tank-Commander

Spell Reviewer
Level 29
Joined
May 26, 2009
Messages
1,839
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
 
Level 19
Joined
Apr 21, 2013
Messages
1,197
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

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
 
  • '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:
 
Level 19
Joined
Apr 21, 2013
Messages
1,197
  • '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:

Thanks :D i updated it so the extra trigger is gone. Posted the triggers on here too so everyone can view without downloading :)
 
Level 19
Joined
Apr 21, 2013
Messages
1,197
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 :)
 

Kazeon

Hosted Project: EC
Level 32
Joined
Oct 12, 2011
Messages
3,440
- 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
 
Level 18
Joined
Mar 18, 2012
Messages
1,717
  • 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.
JASS:
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:
What if the "default" peasant unit starts to attack other units for an unknown reason? I think you should create a new unit.:wink:

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.
 
Level 36
Joined
Mar 6, 2006
Messages
9,243
-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
 
Level 19
Joined
Apr 21, 2013
Messages
1,197
-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

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?
 
Level 36
Joined
Mar 6, 2006
Messages
9,243
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.
 
Level 19
Joined
Apr 21, 2013
Messages
1,197
-Would it be a problem if i dont put a sound for casting? Some say that its not very handy to use "sound-play" command in spells

-I've just got rid of the angle problem :)

-made two loc variables again

-decreased visions to 50 for both dummies, in day and night.

If these are okay for you I can upload the final version.
 
Level 19
Joined
Apr 21, 2013
Messages
1,197
Well, I think it would be nice too, so how about instead of using sound triggers, I can create a custom buff with only the sound effect and it wont bug.

I created a custom effect, but cant seem to figure it out it wont play any sound :/

Last edit: I found it now it has got a sound too :D
 
Level 19
Joined
Apr 21, 2013
Messages
1,197
-Ability being cast == VARIABLE
-You are leaking badly in the looping trigger, the locs are not removed if height > 5

Okay I didn't have any time for editing in this semester but I'm slowly getting more time since the finals are almost over.

Isn't it good to have a variable to be equal to ability id? The spell name is stored in the variable and the program won't have to check the spells again and again if it is the Chaos Meteor. It is already in a variable and it just checks the variable.

If i make it

  • CM_Height[CM_LoopInteger] Less than or equal to 0.00
instead of 5 would it be leak free?
 
Level 36
Joined
Mar 6, 2006
Messages
9,243
The idea is to not have to edit CM_Execution trigger at all when the spell is imorted. You have "(Ability being cast) Equal to A000" condition there. When imported into a map, the ability will change to whatever spell has the 'A000' raw code in the map. Change that line to use a variable.

I guess you have to study more about removing leaks since you don't seem to completely understand them. You need to remove each location before you overwrite the variable with new data. You are overwriting temp_loc_1 in the "then" part.
 

KILLCIDE

Arena Moderator
Level 36
Joined
Jul 22, 2015
Messages
3,487

Needs Fixed

  • Dummy units should not be hardcoded
  • The dummy unit should be not the one to deal damage. The caster would get zero credit if they were to land any killing blows

Suggestions

  • I'm not a big fan of having a unique dummy unit for every special effect required for a spell. Look into vexorian's dummy and attach special effects via triggers
  • It would be a bit better to have the How to Import instructions in a single trigger comment instead of having it up in the header
  • FallingSpeed is a pretty important mechanic in my opinion. I would add a multi-level support for it. I would also add a note on how what the value really represents. I obviously know its over a second because you multiplity it by the periodic timeout, but a new user might be confused with the algorithm
  • Periodic timeout should be a configurable variable. If a user were to change one, but not everything else dependent with it, the spell will bug out
  • The spin speed should be added as a configurable
  • (Units In Range) has a minor reference leak
  • I think it would be slightly faster to use the "Unit - Unit Classification Check" for magic immune instead of "Unit - Unit-Type Classification Check"
  • The spell being able to destroy trees should be configurable
  • CM is a bit too generic as a prefix name. Users might run into variable conflicts if they use the same prefix in their map

Status

Awaiting Update
 

KILLCIDE

Arena Moderator
Level 36
Joined
Jul 22, 2015
Messages
3,487

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 until you dont need it anymore
  • This trigger -> CMSS_Loop <gen> because why not

Status

Approved
 
Top