Special Effect Destruction

Soulshadow

New Member
Reaction score
6
Problem:
I've got a spell called 'Hand of Death,' and I can't seem to find a way to destroy the finger of death animations left behind, and using a dummy just isn't working, I need a simple solution.
The Spell:
Hand of Death
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Hand of Death
Actions
Unit Group - Pick every unit in (Units within (275.00 + (175.00 x (Real((Level of Hand of Death for (Casting unit)))))) of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal and do (Actions)
Loop - Actions
Unit - Cause (Casting unit) to damage (Picked unit), dealing (500.00 x (1.90 x (Real((Level of Hand of Death for (Casting unit)))))) damage of attack type Spells and damage type Death

Basically what I need is finger of death lightning effects shooting from a dummy/another effect that is using the Item Soul Theft effect (Hand coming from the ground around an orb) and then have them destroy. When I use Destroy Last Created Special Effect it only destroys one, can anyone help me out?
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
you didn't put the action where the special effect is created/removed.... show the whole trigger you got (or are you creating the special effect without triggers?)
 

Soulshadow

New Member
Reaction score
6
Well that's just it. I'm asking, is it possible to create multiple special effects with one trigger and then destroy all those effects, or must I create a dummy spell? And if so how would I go about doing that?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Well, im just thinking, create the effect, set a variable to last created effect, create more, set more, and remove all the effects in the variable.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
I made this trigger that creates a "prison" effect in a circle around point and it works just fine:

Code:
special effects
    Events
        Time - Elapsed game time is 2.00 seconds
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set angle = (angle + 36.00)
                Special Effect - Create a special effect at ((Center of (Playable map area)) offset by 256.00 towards angle degrees) using Abilities\Spells\Orc\ReinforcedTrollBurrow\ReinforcedTrollBurrowTarget.mdl
                Set special_effect[(Integer A)] = (Last created special effect)
        Wait 5.00 seconds
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Special Effect - Destroy special_effect[(Integer A)]
        Set angle = 0.00

(set angle to 0 in map init)

...this is just an example how can you easily remove multiple special effects
 

Soulshadow

New Member
Reaction score
6
The first answer by Skyblade333 sounds like a simple solution, but i've tried to do that and it doesn't work. Since I'm using pick every unit in (range of spell being cast blah blah) and then doing create a special effect for each unit picked, if i do "set last created special effect = variable (special effect) then it just overwrites it with each created SFX.
The second answer from Dinowc doesn't exactly sound relevant, as I'm not trying to do a looped event, this is a one step,create then destroy spell.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Thats the point, use more variables, so, lets say, ur creating 10. Create 1 special effect, set it to variable1. second special effect, second variable... all the way. You can always do more if it is a random number.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
ok for you spell I made a trigger that works for me (I used flamestrike):

Code:
spell effect
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Flame Strike
    Actions
        Set unit_group = (Units within (275.00 + (175.00 x (Real((Level of Flame Strike for (Casting unit)))))) of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to true
        Unit Group - Pick every unit in unit_group and do (Actions)
            Loop - Actions
                Set special_effect_count = (special_effect_count + 1)
                Unit - Cause (Casting unit) to damage (Picked unit), dealing (500.00 + (1.90 x (Real((Level of Flame Strike for (Casting unit)))))) damage of attack type Spells and damage type Death
                Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Orc\SpiritLink\SpiritLinkTarget.mdl
                Set death_effect[special_effect_count] = (Last created special effect)
        Wait 5.00 seconds
        For each (Integer A) from 1 to (Number of units in unit_group), do (Actions)
            Loop - Actions
                Special Effect - Destroy death_effect[(Integer A)]
        Custom script: call DestroyGroup(udg_unit_group)
        Set special_effect_count = 0

I think this leaks but I don't have time for more...

special_effect_count is a 100 value integer array variable that acts like (Integer A)

The biggest problem in this spell is that it isn't MUI...
 
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