Special effects don't get removed.

turok255

New Member
Reaction score
30
Alright Heres the deal, this spell im making summons a bunch of shards of ice and wind and stuff, It makes them does the damage just fine, But it dosen't destory my special effects at the end of the trigger...

Just a wild guess but im betting its the bolder/underlined part.
The wait is outside the loops, inside it only creates one effect, I know waits cause problems but I didn;t wanna have to turn them into units.

Code:
Cryokinesis
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Cryokinesis 
    Actions
        -------- Setting Variables --------
        Set Cryokinesis_Caster = (Triggering unit)
        Set Cryokinesis_Target_Point = (Target point of ability being cast)
        Set Cryokinesis_Target = (Target unit of ability being cast)
        -------- Special Effects --------
        For each (Integer A) from 1 to 25, do (Actions)
            Loop - Actions
                Special Effect - Create a special effect at (Random point in (Region centered at Cryokinesis_Target_Point with size ((Real((Random integer number between 1 and 500))), (Real((Random integer number between 1 and 500)))))) using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
                Set Cryokinesis_Effect1 = (Last created special effect)
                Special Effect - Create a special effect at (Random point in (Region centered at Cryokinesis_Target_Point with size ((Real((Random integer number between 1 and 500))), (Real((Random integer number between 1 and 500)))))) using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
                Set Cryokinesis_Effect2 = (Last created special effect)
                Special Effect - Create a special effect at (Random point in (Region centered at Cryokinesis_Target_Point with size ((Real((Random integer number between 1 and 500))), (Real((Random integer number between 1 and 500)))))) using Abilities\Spells\Items\AIil\AIilTarget.mdl
                Set Cryokinesis_Effect3 = (Last created special effect)
                -------- Dealing The Damage --------
                Unit - Create 1 Dummy for (Owner of Cryokinesis_Caster) at Cryokinesis_Target_Point facing Default building facing degrees
                Set Cryokinesis_Dummy = (Last created unit)
                Unit - Add a 15.00 second Generic expiration timer to Cryokinesis_Dummy
                Unit - Add DPS (For The Dummy) to Cryokinesis_Dummy
                Unit - Set level of DPS (For The Dummy) for Cryokinesis_Dummy to (Level of Cryokinesis  for Cryokinesis_Caster)
                Unit - Order Cryokinesis_Dummy to Night Elf Demon Hunter - Activate Immolation
        Custom script:   call RemoveLocation (udg_Cryokinesis_Target_Point)
        [B][U][I]Wait 15.00 seconds
                        Custom script:   call DestroyEffect (udg_Cryokinesis_Effect1)
                Custom script:   call DestroyEffect (udg_Cryokinesis_Effect2)
                Custom script:   call DestroyEffect (udg_Cryokinesis_Effect3)[/I][/U][/B]
 

Frozenwind

System maker
Reaction score
99
Since your not using an array:
you create 3×25 effects and you only got 3 global variables where you store them in, this means that you remove 3/75 effects...

Wanna fix it?
Code:
Set Cryokinesis_Effect1[(IntegerA)] = (Last created special effect)
Do that for each of them and do:
JASS:
call DestroyEffect (udg_Cryokinesis_Effect1[bj_forLoopAIndex])


Tick the "array" box and set its size to 25 at the variable window.

frozenwind.
 

turok255

New Member
Reaction score
30
Thats what I was guessing the problem was :rolleyes:, Guess i need to polish my skills in certain places in the trigger editor
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top