Why does this spell not work?

Dark_Phoenix

New Member
Reaction score
3
I based a spell off of Death Coil, which is supposed to summon some Aboms a few seconds within eachother, then deal 500 damage, then kill all aboms in the map. For some reason, the Aboms are not appearing. What am I doing wrong?

 

Cold

New Member
Reaction score
4
First of all your trigger leaks tremendously.

Secondly, you should put this at the start of the actions:

Set Variable - SoulStealPoint[1] = Position of target unit of ability being cast.
Set Variable - SoulStealPoint[2] = Position of triggering unit.

Then when you reference those position later on replace it with those variable. As it is written now the position of those units is lost after the waits.

You should also create a variable for the target unit. SoulStealUnit = Target unit of ability being cast. You reference the target unit later when changing its colors or w/e but that can be lost because of your waits. You do not have to destroy this variable because it does not leak. Getting tired of variables yet? ^_^

You reference a group at the end when making all abominations explode. You should add a Set Variable - Set AbominationGroup = Units in playable map area of type Abomination before and then do pick every unit in AbominationGroup and do explode unit. Then Custom Script: call DestroyGroup(udg_AbominationGroup) to remove that leak.

You should also set those special effects to variables and then use the built in Special Effect - Destroy (Your sfx variable), as it is now you try to destroy the last effect after a wait and if another effect is created during that time your original effect is lost and takes up space because you can't find it.

At the end do Custom Script: call RemoveLocation(udg_SoulStealPoint[1]) (udg_Variable[2] for the rest of the array, etc) to remove the point leak.
 

LightChaosma

New Member
Reaction score
60
well, definatly not a very good trigger, but that aside, store the target, and the location in vars, and try agian.

side note, use copy as text and [ code] [ /code] to post your trigger
 

Dark_Phoenix

New Member
Reaction score
3
First of all your trigger leaks tremendously.

Secondly, you should put this at the start of the actions:

Set Variable - SoulStealPoint[1] = Position of target unit of ability being cast.
Set Variable - SoulStealPoint[2] = Position of triggering unit.

Then when you reference those position later on replace it with those variable. As it is written now the position of those units is lost after the waits.

You should also create a variable for the target unit. SoulStealUnit = Target unit of ability being cast. You reference the target unit later when changing its colors or w/e but that can be lost because of your waits. You do not have to destroy this variable because it does not leak. Getting tired of variables yet? ^_^

You reference a group at the end when making all abominations explode. You should add a Set Variable - Set AbominationGroup = Units in playable map area of type Abomination before and then do pick every unit in AbominationGroup and do explode unit. Then Custom Script: call DestroyGroup(udg_AbominationGroup) to remove that leak.

You should also set those special effects to variables and then use the built in Special Effect - Destroy (Your sfx variable), as it is now you try to destroy the last effect after a wait and if another effect is created during that time your original effect is lost and takes up space because you can't find it.

At the end do Custom Script: call RemoveLocation(udg_SoulStealPoint[1]) (udg_Variable[2] for the rest of the array, etc) to remove the point leak.

It works now! Thanks!
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Those are so unreliable... Just remember which stuff leaks.

Groups, points, etc.
 

Romek

Super Moderator
Reaction score
963
Everything that extends handle.

Or in other words:
Everything that isn't a Real, Integer, Boolean, Code, or Player (Players do extend handle. But they stay around forever)
 

Vestras

Retired
Reaction score
248
Also, strings.

Strings actually leak in JASS, but there are no way to null these.
- Actually, strings are arrays of characters, and take memory. The only way to avoid a lot of leaks is by not creating many strings.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top