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

Hell Eruption V 1.11

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
The Hero creates an explosion at targeted point, which deals damage and knocks back all units in the area. Does not affect buildings, dead units, your own units or self.

Unless there is more leaks in the spell, this will be the final version!

  • Hell Eruption
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Hell Eruption
    • Actions
      • Set EruptionPoint = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of EruptionPoint matching ((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit)))) and do (Actions)
        • Loop - Actions
          • Set EruptionDamage = (Last created unit group)
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Level of Hell Eruption for (Triggering unit)))) x 100.00) damage of attack type Chaos and damage type Normal
          • Custom script: call DestroyGroup ( udg_EruptionDamage )
      • Environment - Create a 1.00 second wave deformation from EruptionPoint to EruptionPoint with radius 200.00, depth -200.00, and a 0.00 second trailing delay
      • Special Effect - Create a special effect at EruptionPoint using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at EruptionPoint using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of EruptionPoint) and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Triggering unit) from EruptionPick
          • Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionPick
          • Set EruptionPick = (Last created unit group)
          • Unit - Turn collision for (Picked unit) Off
          • Set EruptionUnitPoint = (Position of (Picked unit))
          • Hashtable - Save (Angle from EruptionPoint to EruptionUnitPoint) as (Key KnockbackDegrees) of (Key (Picked unit)) in Helltable
          • Hashtable - Save 30.00 as (Key KnockbackSpeed) of (Key (Picked unit)) in Helltable
          • Hashtable - Save 30.00 as (Key KnockbackHeight) of (Key (Picked unit)) in Helltable
          • Unit Group - Add (Picked unit) to EruptionGroup
          • Unit Group - Remove (Triggering unit) from EruptionGroup
          • Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionGroup
          • Unit - Turn collision for (Triggering unit) On
          • Custom script: call DestroyGroup ( udg_EruptionPick )
          • Unit - Add Crow Form to (Picked unit)
          • Unit - Remove Crow Form from (Picked unit)
      • Custom script: call RemoveLocation ( udg_EruptionPoint )
      • Custom script: call RemoveLocation ( udg_EruptionUnitPoint )
  • Hell Knockback
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EruptionGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is dead) Equal to True
            • Then - Actions
              • Unit - Turn collision for (Picked unit) On
              • Unit Group - Remove (Picked unit) from EruptionGroup
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is A structure) Equal to True
                • Then - Actions
                  • Unit - Turn collision for (Picked unit) On
                  • Unit Group - Remove (Picked unit) from EruptionGroup
                • Else - Actions
                  • Set KnockbackCurrentPoint = (Position of (Picked unit))
                  • Hashtable - Save ((Load (Key KnockbackSpeed) of (Key (Picked unit)) from Helltable) - 0.75) as (Key KnockbackSpeed) of (Key (Picked unit)) in Helltable
                  • Set KnockbackPoint = (KnockbackCurrentPoint offset by (Load (Key KnockbackSpeed) of (Key (Picked unit)) from Helltable) towards (Load (Key KnockbackDegrees) of (Key (Picked unit)) from Helltable) degrees)
                  • Unit - Move (Picked unit) instantly to KnockbackPoint
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load (Key KnockbackSpeed) of (Key (Picked unit)) from Helltable) Greater than or equal to 20.00
                    • Then - Actions
                      • Hashtable - Save ((Load (Key KnockbackHeight) of (Key (Picked unit)) from Helltable) + 10.00) as (Key KnockbackHeight) of (Key (Picked unit)) in Helltable
                    • Else - Actions
                      • Hashtable - Save ((Load (Key KnockbackHeight) of (Key (Picked unit)) from Helltable) - 10.00) as (Key KnockbackHeight) of (Key (Picked unit)) in Helltable
                  • Animation - Change (Picked unit) flying height to (Load (Key KnockbackHeight) of (Key (Picked unit)) from Helltable) at 1000000000.00
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at KnockbackPoint of type Walkability is off) Equal to True
                    • Then - Actions
                      • Unit - Turn collision for (Picked unit) On
                      • Unit Group - Remove (Picked unit) from EruptionGroup
                      • Animation - Change (Picked unit) flying height to 0.00 at 100000000.00
                      • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Helltable
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load (Key KnockbackSpeed) of (Key (Picked unit)) from Helltable) Equal to 0.00
            • Then - Actions
              • Unit - Turn collision for (Picked unit) On
              • Unit Group - Remove (Picked unit) from EruptionGroup
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Helltable
              • Custom script: call RemoveLocation ( udg_KnockbackCurrentPoint )
              • Custom script: call RemoveLocation ( udg_KnockbackPoint )
            • Else - Actions
  • Hell Effect
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EruptionGroup and do (Actions)
        • Loop - Actions
          • Set EffectPoint = (Position of (Picked unit))
          • Special Effect - Create a special effect at EffectPoint using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation ( udg_EffectPoint )

V 1.01 - Fixed mentioned leaks
V 1.02 - Removed Custom Values
V 1.10 - Added ability levels which enhances damage, added unit flying height when "knockbacking", fixed leaks, removed the "boundary" information from the in-game text.
V 1.11 - Added another small effect when using the spell. Fixed leaks. New screenshot.


Enjoy! Rate and comment!

Waiting for approval!


Keywords:
Hell, Eruption, Hell Eruption, Laserdude, Epic, Knockback, Area, Knock, Back, Boom, Kaboom, Effect,Fly.
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: Too long time as NeedsFix. Rejected. 17:14, 4th Mar 2011 Bribe:

Moderator

M

Moderator

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

17:14, 4th Mar 2011
Bribe:
 
You are using a bad way to apply the boundary limit. Instead of forcing the users to create a whole contour of dark grass, apply this condition instead:
  • (Terrain pathing at KnockbackPoint of type Walkability is off) Equal to True
It's a boolean comparison, "Environment - Terrain pathing is off".

Your triggers leak and the hashtable is not used in a potential way. You are attempting to combine and indexing system with a hashtable, when it is not needed.

  • Set EruptionPoint = (Target point of ability being cast)
You never remove the set location.

  • Unit Group - Pick every unit in (Units within 300.00 of EruptionPoint) and do (Actions)
    • Loop - Actions
Leaks. Use this custom script before the action above:
  • Custom script: set bj_wantDestroyGroup = true
  • Set EruptionUnitPoint = (Position of (Picked unit))
  • Set KnockbackCurrentPoint = (Position of (Picked unit))
  • Set KnockbackPoint = (KnockbackCurrentPoint offset by KnockbackSpeed[(Load (Key CustomValue) of (Key (Picked unit)) from Helltable)] towards KnockbackDegrees[(Load (Key CustomValue) of (Key (Picked unit)) from Helltable)] degrees)
Again, you don't remove the set location.

  • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
Leaks a point.

The spell needs a triggering overhaul, I'm afraid :/
 
Level 8
Joined
Jun 30, 2010
Messages
259
You are using a bad way to apply the boundary limit. Instead of forcing the users to create a whole contour of dark grass, apply this condition instead:
  • (Terrain pathing at KnockbackPoint of type Walkability is off) Equal to True
It's a boolean comparison, "Environment - Terrain pathing is off".

Your triggers leak and the hashtable is not used in a potential way. You are attempting to combine and indexing system with a hashtable, when it is not needed.

  • Set EruptionPoint = (Target point of ability being cast)
You never remove the set location.

  • Unit Group - Pick every unit in (Units within 300.00 of EruptionPoint) and do (Actions)
    • Loop - Actions
Leaks. Use this custom script before the action above:
  • Custom script: set bj_wantDestroyGroup = true
  • Set EruptionUnitPoint = (Position of (Picked unit))
  • Set KnockbackCurrentPoint = (Position of (Picked unit))
  • Set KnockbackPoint = (KnockbackCurrentPoint offset by KnockbackSpeed[(Load (Key CustomValue) of (Key (Picked unit)) from Helltable)] towards KnockbackDegrees[(Load (Key CustomValue) of (Key (Picked unit)) from Helltable)] degrees)
Again, you don't remove the set location.

  • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
Leaks a point.

The spell needs a triggering overhaul, I'm afraid :/

Fixed!!
Thanks for the help!
EDIT: The indexing system is required to set the custom value of the units to a proper value, otherwise all the units would end up with the same value, resulting in that the spell would not run properly.
 
Level 8
Joined
Jun 30, 2010
Messages
259
never ever use custom value. Remove it all.

Leaks effect point too btw

It does not leak an effect point. It did, but that is fixed now.
Your post is very unclear, try to state WHY I should never use custom values, and while I am only using it for 0 seconds, since I am putting that information in a hashtable, it doesn't matter. But fine, I will remove the custom values.
EDIT: Done! Custom Values Removed. If you dissagree to this post, please just PM me instead of writing a comment here to clear out some space.
 
Level 8
Joined
Jun 30, 2010
Messages
259
custom value shouldnt be used as if any other trigger use it it will bug. If i remember correct isnt custom value unituserdata in jass? If that's the case it will break with all vjass autoindexing systems.
2 things:
1. Didn't I tell in my first post that if someone dissagreed he could PM me to clear up some space on the thread?
However, it does not matter, number 2. No it won't, since I was only setting it once and then it would be removed, therefore, it was not stored, therefore if some other spell used custom values, it would not bug, UNLESS that spell was STORING the custom values, since then THAT spell would stop running.
So, if that would happen, THEY did wrong, not me.

EDIT: 1 third thing: I am NOT using jass.


I still see Custom Value on the trigger posted above...
EDIT: oh wait... I think its a String Hash [Key(CustomValue)]... sorry... ^_^...

btw, you can just use definite values there like 0... it wont cause any bug unless you have another spell that uses that same hashtable which isnt recommended...


I won't be using the same hastbale, no. But what do you mean by using definite values? If you have the time to disscuss it, then PM me and we can talk some more!
 
2 things:
1. Didn't I tell in my first post that if someone dissagreed he could PM me to clear up some space on the thread?
However, it does not matter, number 2. No it won't, since I was only setting it once and then it would be removed, therefore, it was not stored, therefore if some other spell used custom values, it would not bug, UNLESS that spell was STORING the custom values, since then THAT spell would stop running.
So, if that would happen, THEY did wrong, not me.

EDIT: 1 third thing: I am NOT using jass.


I still see Custom Value on the trigger posted above...
EDIT: oh wait... I think its a String Hash [Key(CustomValue)]... sorry... ^_^...

btw, you can just use definite values there like 0... it wont cause any bug unless you have another spell that uses that same hashtable which isnt recommended...


I won't be using the same hastbale, no. But what do you mean by using definite values? If you have the time to disscuss it, then PM me and we can talk some more!

You use Key (CustomValue) right? I believe that it uses the function Hashtable - Get Sring ID right? But rather than using it, you can just use a value like 0.00, so it saves a function call...

the hashtable line would then be like this now

Hashtable - Save HellMUI as 0 of (Key (Picked unit)) in Helltable

its just to avoid unnecessary function calls...

anyway, your spell would bug if the same unit gets hit more than once... but not a serious bug though and I think its a favorable thing also (only the last knockback for the unit will fire...) ^_^

btw, you just used the hashtable to save the index directly to a unit right? In this spell that's kinda okay but next time dont, it will cause serious bugs to occur because the unit's index is reset if he gets hit again before the spelleffect ends(in this case the knockback), and it causes you to have hanging indexes (indexes that dont get used)... I suggest you to just use a complete recycling index, its just a few edits from your current trigger...

hmmm... HellEffect leaks locations, you did not destroy each location after usage...
add this at the end of the GroupLoop, Custom script: call RemoveLocation(udg_EffectPoint)

and I dont suggest using this line:

Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 300.00 at EruptionPoint, dealing 150.00 damage of attack type Chaos and damage type Normal

-IDK if its fixed now but before, that action hits allies... if its already fixed then fine... but I suggest you to use the action Unit - Damage target, put it in the group loop on the cast trigger.

Anyway it seems to be a good spell, good luck
 
Level 8
Joined
Jun 30, 2010
Messages
259
You use Key (CustomValue) right? I believe that it uses the function Hashtable - Get Sring ID right? But rather than using it, you can just use a value like 0.00, so it saves a function call...

the hashtable line would then be like this now

Hashtable - Save HellMUI as 0 of (Key (Picked unit)) in Helltable

its just to avoid unnecessary function calls...

anyway, your spell would bug if the same unit gets hit more than once... but not a serious bug though and I think its a favorable thing also (only the last knockback for the unit will fire...) ^_^

btw, you just used the hashtable to save the index directly to a unit right? In this spell that's kinda okay but next time dont, it will cause serious bugs to occur because the unit's index is reset if he gets hit again before the spelleffect ends(in this case the knockback), and it causes you to have hanging indexes (indexes that dont get used)... I suggest you to just use a complete recycling index, its just a few edits from your current trigger...

hmmm... HellEffect leaks locations, you did not destroy each location after usage...
add this at the end of the GroupLoop, Custom script: call RemoveLocation(udg_EffectPoint)

and I dont suggest using this line:

Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 300.00 at EruptionPoint, dealing 150.00 damage of attack type Chaos and damage type Normal

-IDK if its fixed now but before, that action hits allies... if its already fixed then fine... but I suggest you to use the action Unit - Damage target, put it in the group loop on the cast trigger.

Anyway it seems to be a good spell, good luck

That is a long message!
However, there are no custom values in this spell, the only line of custom values are the custom value save in the hashtable, which is NOT a custom value, but a string!

I know that it does damage allies, I can easily fix this by using a unit group, but I figured I wanted this spell to be friendly fire, since that makes it more epic, however, I am considering removing the damage from the caster, cause that seems a little wierd...
Thanks for the mentioning about the spell effect leak! Forgot that one!

Someone mentioned more levels.
Sure, I already know how to do this, I will fix some things in this spell and include that!

And the knockback does NOT bug if it hits the same unit twice! Try to add a knight to the map and test it on him, works just fine.

In the next version (V 1.10), I will make the units fly a bit, fix some bugs and leaks, add ability levels, and maybe add some other eyecandy.
 
I never said that you are using CUSTOMVALUE (the integer one),

Posted by me:

You use Key (CustomValue) right? I believe that it uses the function Hashtable - Get String ID right? But rather than using it, you can just use a value like 0.00, so it saves a function call...

see I SAID IT WAS A STRING, STRING, STRING!!!!!!!!!!!!!!!!!!!!!!!!
(and besides how can you use an integer in a function that takes a string parameter???)

basically you get a key based on the STRING customvalue, so basically it calls a function... that's why I said just use a value like 0.00 rather than using Hashtable - Get String ID

about the friendly fire: well since this is a submitted spell, its better if that is optional...

about the knockback, well you can say it does not really bug, coz it doesnt look like a bug really (knockbacks on same unit does not stack, only the last one stays)., it might even be favorable because it will look bad if the knockbacks stack... that's why I said, its okay for this spell but next time/other spells dont use that method... coz it could cause bugs...
 
Last edited:
Level 8
Joined
Jun 30, 2010
Messages
259
I never said that you are using CUSTOMVALUE (the integer one),

Posted by me:

You use Key (CustomValue) right? I believe that it uses the function Hashtable - Get String ID right? But rather than using it, you can just use a value like 0.00, so it saves a function call...

see I SAID IT WAS A STRING!!!!!!!!!!!!!!!!!!!!!!!!
(and besides how can you use an integer in a function that takes a string parameter???)

basically you get a key based on the STRING customvalue, so basically it calls a function... that's why I said just use a value like 0.00 rather than using Hashtable - Get String ID

about the friendly fire: well since this is a submitted spell, its better if that is optional...

When quoting youself or someone other, use HIDDEN -tags to clear up some space, please.

I am saving an integer as a string cause the units with those numbers will allways be there, so there will be no bugs in that the spell mixes some of the numbers togheter and makes one unit stop "knockbacking".

And fine then, I will remove the friendly fire.
I am working on the new version atm.
 
the STRING CustomValue will always return the same value no matter what the unit is... so just use 0.00

this:
Hashtable - Save HellMUI as Key (CustomValue) of (Key (Picked unit)) in Helltable

is almost the same as this:

Hashtable - Save HellMUI as 0.00 of (Key (Picked unit)) in Helltable

but the second one uses a value directly... anyway its not that much difference...

and it wont bug because you still use (Key (Picked unit))...

You dont really need to change it, just a suggestion since you only use one Integer Save in the hashtable... and I just explained it because you asked in the previous posts...


the next update will contain the unit fly?
 
Level 8
Joined
Jun 30, 2010
Messages
259
the STRING CustomValue will always return the same value no matter what the unit is... so just use 0.00

this:
Hashtable - Save HellMUI as Key (CustomValue) of (Key (Picked unit)) in Helltable

is almost the same as this:

Hashtable - Save HellMUI as 0.00 of (Key (Picked unit)) in Helltable

but the second one uses a value directly... anyway its not that much difference...

and it wont bug because you still use (Key (Picked unit))...

You dont really need to change it, just a suggestion since you only use one Integer Save in the hashtable... and I just explained it because you asked in the previous posts...


the next update will contain the unit fly?

Ah, I understand now, so THAT is what Pharanoh_ mentioned in the first post.
I agree that it is unnesseccary with an indexing system that is not needed, I will remove it.
EDIT: It seems like the indexing system is still needed, but what I meant was that this will make the trigger react quicker, so I will change CustomValue to 0.
And yes, V 1.10 will contaion that the units fly, but it seems as there might be a smaller bug in it, but it will be fixed before I upload it.
 
since you're using hashtables, why dont you just save everything in the hashtable so you can get rid of the index, or do it the other way, make it a full index system so you can remove the hashtable... coz as Pharaoh_ said, you dont need to combine hashtables and indexing...

if you ever decided to

on the current state of the triggers, I think it will be easier to do the first one... coz you'll only need to change the parts where you save the values into the arrays and when you load them... ^_^

but performance wise, the 2nd one is better...
 
Level 8
Joined
Jun 30, 2010
Messages
259
since you're using hashtables, why dont you just save everything in the hashtable so you can get rid of the index, or do it the other way, make it a full index system so you can remove the hashtable... coz as Pharaoh_ said, you dont need to combine hashtables and indexing...

if you ever decided to

on the current state of the triggers, I think it will be easier to do the first one... coz you'll only need to change the parts where you save the values into the arrays and when you load them... ^_^

but performance wise, the 2nd one is better...

And how would you like me to remove the index?
I have to save the units somehow, and how do you want me to save them without an Index?
 
Save everything in the hashtable... you wont even need the variables anymore... I will use string hash to avoid confusions, but you can use direct integers... ^_^

All of the first keys in the hashtable are Strings...

  • Unit Group - Remove (Triggering unit) from EruptionPick
  • Set EruptionPick = (Last created unit group)
  • Unit - Turn collision for (Picked unit) Off
  • Set EruptionUnitPoint = (Position of (Picked unit))
  • Hashtable - Save (Angle from EruptionPoint to EruptionUnitPoint) as Key(Angle) of Key(PickedUnit) in Helltable
  • Hashtable - Save 30.00 as Key(KnockbackSpeed) of Key(PickedUnit) in Helltable
  • Hashtable - Save 30.00 as Key(KnockbackHeight) of Key(PickedUnit) in Helltable
  • Unit Group - Add (Picked unit) to EruptionGroup
  • Unit Group - Remove (Triggering unit) from EruptionGroup
  • Unit - Turn collision for (Triggering unit) On
  • Custom script: call DestroyGroup ( udg_EruptionPick )
other note, you should transfer this lines to outside the group loop to save function calls...
Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionGroup
Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionPick

another note: you dont need the DestroyGroup there anymore, coz you already set_bjwantdestroygroup to false...

now on your periodic loop, instead of using the arrays, just load those hashtable values

example:
  • Hashtable - Save (Load Key(KnockBackSpeed) of (Key (Picked unit)) from Helltable) - 0.75) as Key(KnockBackSpeed) of (Key (Picked unit)) from Helltable
another example:
  • Animation - Change (Picked unit) flying height to (Load Key(KnockBackHeight) of (Key (Picked unit)) from Helltable) at 1000000000.00
And one note: This will be completely MUI and will work the same as your current trigger

Oh, you still have lots of location leaks... transfer this to the Else - Actions, coz on they're current location (at the end of the trigger) they only clear the last position created but all positions before that will leak...

Custom script: call RemoveLocation ( udg_KnockbackCurrentPoint )
Custom script: call RemoveLocation ( udg_KnockbackPoint )

now, I agree with Pharaoh_, that this spell needs an overhaul...

now, dont make haste, fix it little by little... ^_^
 
Level 8
Joined
Jun 30, 2010
Messages
259
Save everything in the hashtable... you wont even need the variables anymore... I will use string hash to avoid confusions, but you can use direct integers... ^_^

All of the first keys in the hashtable are Strings...

  • Unit Group - Remove (Triggering unit) from EruptionPick
  • Set EruptionPick = (Last created unit group)
  • Unit - Turn collision for (Picked unit) Off
  • Set EruptionUnitPoint = (Position of (Picked unit))
  • Hashtable - Save (Angle from EruptionPoint to EruptionUnitPoint) as Key(Angle) of Key(PickedUnit) in Helltable
  • Hashtable - Save 30.00 as Key(KnockbackSpeed) of Key(PickedUnit) in Helltable
  • Hashtable - Save 30.00 as Key(KnockbackHeight) of Key(PickedUnit) in Helltable
  • Unit Group - Add (Picked unit) to EruptionGroup
  • Unit Group - Remove (Triggering unit) from EruptionGroup
  • Unit - Turn collision for (Triggering unit) On
  • Custom script: call DestroyGroup ( udg_EruptionPick )
other note, you should transfer this lines to outside the group loop to save function calls...
Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionGroup
Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionPick

another note: you dont need the DestroyGroup there anymore, coz you already set_bjwantdestroygroup to false...

now on your periodic loop, instead of using the arrays, just load those hashtable values

example:
  • Hashtable - Save (Load Key(KnockBackSpeed) of (Key (Picked unit)) from Helltable) - 0.75) as Key(KnockBackSpeed) of (Key (Picked unit)) from Helltable
another example:
  • Animation - Change (Picked unit) flying height to (Load Key(KnockBackHeight) of (Key (Picked unit)) from Helltable) at 1000000000.00
And one note: This will be completely MUI and will work the same as your current trigger

Oh, you still have lots of location leaks... transfer this to the Else - Actions, coz on they're current location (at the end of the trigger) they only clear the last position created but all positions before that will leak...

Custom script: call RemoveLocation ( udg_KnockbackCurrentPoint )
Custom script: call RemoveLocation ( udg_KnockbackPoint )

now, I agree with Pharaoh_, that this spell needs an overhaul...

now, dont make haste, fix it little by little... ^_^

You really made me facepalm there, since I did not think of making the variables to hashtable information instantly. I was thinking that I was gonna change the HellMUI variable, but when you are mentioning this method I can see that it is not needed.

I saw that point leak and fixed it, althought I will not update the spell untill I have updated all the things mentioned, which might take a while.
 


You really made me facepalm there, since I did not think of making the variables to hashtable information instantly. I was thinking that I was gonna change the HellMUI variable, but when you are mentioning this method I can see that it is not needed.

I saw that point leak and fixed it, althought I will not update the spell untill I have updated all the things mentioned, which might take a while.

^_^... good luck... :goblin_boom:

just be sure not to push yourself too hard... if somethings not clear, read a tutorial, ask etc...
 
I have one question.
I understand what you mean about not using Variables, but what about the point variables? Don't they leak if I make them Hashtable data? And how to destroy them?

well, just use the point variable for the points... its easier to do it that way... and you just use them instantly right?

one more thing, you dont flush the child hashtables after usage...
 
Hashtable - Flush all child hashtables of Key(PickedUnit) in HellTable

but only do this after you're done using a child hashtable of a unit
->meaning just do this only when the unit is removed from the knockback group and after you clear other possible leaks in the hashtable (ex. saved locations, groups, etc - which on this spell's case, no such exist...)...

if you dont do it, the data saved in the hashtable will stay in memory...
 
Level 8
Joined
Jun 30, 2010
Messages
259
Hashtable - Flush all child hashtables of Key(PickedUnit) in HellTable

but only do this after you're done using a child hashtable of a unit
->meaning just do this only when the unit is removed from the knockback group and after you clear other possible leaks in the hashtable (ex. saved locations, groups, etc - which on this spell's case, no such exist...)...

if you dont do it, the data saved in the hashtable will stay in memory...

So you mean I shall NOT clear the hashtable's memory?
 
Flushing will clear the memory of a specific child of the hashtable and not the whole hashtable itself (it could bug if you do clear the whole hashtable), but it wont destroy things like locations, groups and such, that's why only use Flush after you destroy things that could leak...

for example if you saved a group and a location into the hashtable, destroy the group and location first before flushing

  • Custom script: call RemoveLocation(LoadLocationHandle(udg_HellTable, GetHandleId(PickedUnit), StringHash(Location)))
  • Custom script: call DestroyGroup(LoadGroupHandle(udg_HellTable, GetHandleId(PickedUnit), StringHash(Group)))
  • Hashtable - Clear all child hashtables of child Key(Picked Unit) in HellTable
 
Level 8
Joined
Jun 30, 2010
Messages
259
Flushing will clear the memory, but it wont destroy things like locations, groups and such, that's why only use Flush after you destroy things that could leak...

Would this be enought?
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in EruptionGroup) Equal to 0
    • Then - Actions
      • Hashtable - Clear all child hashtables of child (Key KnockbackSpeed) in Helltable
      • Hashtable - Clear all child hashtables of child (Key KnockbackHeight) in Helltable
    • Else - Actions
      • Custom script: call RemoveLocation ( udg_KnockbackCurrentPoint )
      • Custom script: call RemoveLocation ( udg_KnockbackPoint )
 
Would this be enought?
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in EruptionGroup) Equal to 0
    • Then - Actions
      • Hashtable - Clear all child hashtables of child (Key KnockbackSpeed) in Helltable
      • Hashtable - Clear all child hashtables of child (Key KnockbackHeight) in Helltable
    • Else - Actions
      • Custom script: call RemoveLocation ( udg_KnockbackCurrentPoint )
      • Custom script: call RemoveLocation ( udg_KnockbackPoint )

you do it for picked unit not for the stringhash... (the second key, not the first..., because the first key is just to save a value into a child hashtable which is defined by the second value: Parent - hashtable, child - 2nd key)

I edited the post above... see it...
 
Level 8
Joined
Jun 30, 2010
Messages
259
  • Custom script: call RemoveLocation(LoadLocationHandle(udg_HellTable, GetHandleId(PickedUnit), StringHash(Location)))
  • Custom script: call DestroyGroup(LoadGroupHandle(udg_HellTable, GetHandleId(PickedUnit), StringHash(Group)))
  • Hashtable - Clear all child hashtables of child Key(Picked Unit) in HellTable

1. You told me not to use hashtable data for the locations.
2. Where did you get those 2 custom scripts from? I do not have any 2 Custom scripts of those types after eachother in my spell.
3. Similar to 2. Where exactly are you using the Actions?
 
note: that is just an example!!!!!!!!!!!!!!!

1) I told you not use the hashtable for locations because you dont need to transfer the locations from onCast to the periodic trigger...
2)SEE THE NOTE ABOVE

Since the current trigger on your first post is not an updated one, I cannot pinpoint where to put the Clear action... but the idea is put it when you finished using the child hashtable of a unit, meaning after he finishes the effect of the knockback, so most likely before you remove him from the group...
 
Level 8
Joined
Jun 30, 2010
Messages
259
note: that is just an example!!!!!!!!!!!!!!!

1) I told you not use the hashtable for locations because you dont need to transfer the locations from onCast to the periodic trigger...
2)SEE THE NOTE ABOVE

Since the current trigger on your first post is not an updated one, I cannot pinpoint where to put the Clear action... but the idea is put it when you finished using the child hashtable of a unit, meaning after he finishes the effect of the knockback, so most likely before you remove him from the group...

Then I am not changing the points into hashtable data.

Sorry! I forgot to post the trigger! Here it is, the clear hashtasble action should be in the right place aswell.

  • Hell Knockback
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in EruptionGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is dead) Equal to True
            • Then - Actions
              • Unit - Turn collision for (Picked unit) On
              • Unit Group - Remove (Picked unit) from EruptionGroup
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is A structure) Equal to True
                • Then - Actions
                  • Unit - Turn collision for (Picked unit) On
                  • Unit Group - Remove (Picked unit) from EruptionGroup
                • Else - Actions
                  • Set KnockbackCurrentPoint = (Position of (Picked unit))
                  • Hashtable - Save ((Load (Key KnockbackSpeed) of (Key (Picked unit)) from Helltable) - 0.75) as (Key KnockbackSpeed) of (Key (Picked unit)) in Helltable
                  • Set KnockbackPoint = (KnockbackCurrentPoint offset by (Load (Key KnockbackSpeed) of (Key (Picked unit)) from Helltable) towards (Load (Key KnockbackDegrees) of (Key (Picked unit)) from Helltable) degrees)
                  • Unit - Move (Picked unit) instantly to KnockbackPoint
                  • Unit - Add Crow Form to (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load (Key KnockbackSpeed) of (Key (Picked unit)) from Helltable) Greater than or equal to 20.00
                    • Then - Actions
                      • Hashtable - Save ((Load (Key KnockbackHeight) of (Key (Picked unit)) from Helltable) + 10.00) as (Key KnockbackHeight) of (Key (Picked unit)) in Helltable
                    • Else - Actions
                      • Hashtable - Save ((Load (Key KnockbackHeight) of (Key (Picked unit)) from Helltable) - 10.00) as (Key KnockbackHeight) of (Key (Picked unit)) in Helltable
                  • Animation - Change (Picked unit) flying height to (Load (Key KnockbackHeight) of (Key (Picked unit)) from Helltable) at 1000000000.00
                  • Unit - Remove Crow Form from (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at KnockbackPoint of type Walkability is off) Equal to True
                    • Then - Actions
                      • Unit - Turn collision for (Picked unit) On
                      • Unit Group - Remove (Picked unit) from EruptionGroup
                      • Unit - Add Crow Form to (Picked unit)
                      • Animation - Change (Picked unit) flying height to 0.00 at 200.00
                      • Unit - Remove Crow Form from (Picked unit)
                      • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Helltable
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load (Key KnockbackSpeed) of (Key (Picked unit)) from Helltable) Equal to 0.00
            • Then - Actions
              • Unit - Turn collision for (Picked unit) On
              • Unit Group - Remove (Picked unit) from EruptionGroup
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Helltable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in EruptionGroup) Equal to 0
                • Then - Actions
                • Else - Actions
                  • Custom script: call RemoveLocation ( udg_KnockbackCurrentPoint )
                  • Custom script: call RemoveLocation ( udg_KnockbackPoint )
            • Else - Actions
NOTE: The trigger uses the Clear Hashtable action twice, because the spell finishes when 2 different actions occours.
 
the clears are right but the RemoveLocations are still on the wrong place... they should be inside the loop, after you finished using the locations...

-place them after the if-then-else with the Clear action in the group loop...

Note:
about the crow form, you just need to add it ONCE and remove it ONCE... you can just do it on the first trigger...
you can place the ADD and REMOVE successively, the remove doesnt need to be placed after you changed a unit's fly height...
like this:
  • Unit - Add Crow
  • Unit - Remove Crow
  • Animation - Change Fly height
this would work...
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,456
Hell Eruption

Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionPick

- Leaks

Unit Group - Remove all units of (Units owned by (Owner of (Triggering unit))) from EruptionGroup

- Leaks

Hell Effect

Why not add the effect to the picked unit and save yourself the trouble of locations?
 
Top