Spell is not working properly, need help

Accumilater

New Member
Reaction score
0
The spell does not work properly, it's suppose to create 10 crystals, or ice shards, and place them in a circle around the target, then its suppose to wait and do the 2nd special effects part which does basically the whole inner circle with trap frost up special effects. then its suppose to remove the crystals and the traps special effects at the same time, as soon as the special effects for the traps finish. However, it just creates 10 crystals, waits, SOMETIMES makes the 2nd part, i have no clue why but sometimes it wont do the 2nd part at all and in the same game later after using the spell a few times it starts doing the 2nd part with no other edits to it, and then it removes the 2nd parts special effects, waits for some amount of time im not sure why, then finally removes the crystals.
Code:
Frost Bite
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to FrostBite
    Actions
        Game - Display to (All players) the text: should work  
        Set FBDamage = (((Real((Level of FrostBite for (Triggering unit)))) x 150.00) + (Real((Intelligence of IceWardenCaster (Include bonuses)))))
        Set FrostBitePoint = (Target point of ability being cast)
        Set FrostBiteTarget = (Target unit of ability being cast)
        Set FrostBiteOff[(Integer A)] = (Position of FrostBiteTarget)
        Set FrostBiteCaster = (Casting unit)
        Set FBSFKPart2 = False
        Set FBDESTROYSFX = False
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by -300.00 towards (36.00 x ((Real((Integer A))) - 1.00)) degrees)
                Special Effect - Create a special effect at FrostBiteOff[(Integer A)] using Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal3.mdl
                Set FrostBiteSFX[(Integer A)] = (Last created special effect)
                Unit - Create 1 Frost Bite Dummy for (Owner of FrostBiteCaster) at FrostBiteOff[(Integer A)] facing Default building facing degrees
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by 300.00 towards (36.00 x ((Real((Integer A))) - 1.00)) degrees)
                Unit - Order (Last created unit) to Human Archmage - Blizzard FrostBiteOff[(Integer A)]
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Integer A) Equal to 10
                    Then - Actions
                        Game - Display to (All players) the text: 10
                        Set FBSFKPart2 = True
                        Wait 1.00 seconds
                    Else - Actions
                Special Effect - Destroy FrostBiteSFX[(Integer A)]
                Game - Display to (All players) the text: destroyed crystals
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FBSFKPart2 Equal to True
            Then - Actions
                For each (Integer A) from 1 to 90, do (Actions)
                    Loop - Actions
                        Set FrostBitePoint2[(Integer A)] = (FrostBitePoint offset by -100.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Set FrostBitePoint3[(Integer A)] = (FrostBitePoint offset by -200.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by -300.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Special Effect - Create a special effect at FrostBitePoint2[(Integer A)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                        Set FBP2SFX[(Integer A)] = (Last created special effect)
                        Special Effect - Create a special effect at FrostBitePoint3[(Integer A)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                        Set FBP3SFX[(Integer A)] = (Last created special effect)
                        Special Effect - Create a special effect at FrostBiteOff[(Integer A)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                        Set FBP4SFX[(Integer A)] = (Last created special effect)
                        Set FrostBitePoint2[(Integer A)] = (FrostBitePoint offset by 100.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Set FrostBitePoint3[(Integer A)] = (FrostBitePoint offset by 200.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by 300.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Integer A) Equal to 90
                            Then - Actions
                                Game - Display to (All players) the text: 90
                                Set FBDESTROYSFX = True
                                Wait 1.00 seconds
                            Else - Actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FBDESTROYSFX Equal to True
            Then - Actions
                For each (Integer A) from 1 to 100, do (Actions)
                    Loop - Actions
                        Special Effect - Destroy FBP2SFX[(Integer A)]
                        Special Effect - Destroy FBP3SFX[(Integer A)]
                        Special Effect - Destroy FBP4SFX[(Integer A)]
            Else - Actions
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
You have 2 waits in the loops, they mess up your loops ^^, remove them and try again, if you need the waits you'll have to have a periodic trigger turned on by this trigger, that will do your bidding xD
 

Accumilater

New Member
Reaction score
0
You have 2 waits in the loops, they mess up your loops ^^, remove them and try again, if you need the waits you'll have to have a periodic trigger turned on by this trigger, that will do your bidding xD

Yeah if i take out the waits it just does all the SFX at once, then it just waits for awhile then eventually removes the crystals.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Trigger:
  • ...
    • Set FBDESTROYSFX = False
    • Turn ON SFX
    • Wait 10 seconds
    • Turn OFF SFX
    • ....


Trigger:
  • SFX
    • Events - Every 1 second of the Game
    • Conditions
    • Actions
    • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by -300.00 towards (36.00 x ((Real((Integer A))) - 1.00)) degrees)
      • Special Effect - Create a special effect at FrostBiteOff[(Integer A)] using Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal3.mdl
      • Set FrostBiteSFX[(Integer A)] = (Last created special effect)
      • Unit - Create 1 Frost Bite Dummy for (Owner of FrostBiteCaster) at FrostBiteOff[(Integer A)] facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by 300.00 towards (36.00 x ((Real((Integer A))) - 1.00)) degrees)
      • Unit - Order (Last created unit) to Human Archmage - Blizzard FrostBiteOff[(Integer A)]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Integer A) Equal to 10
        • Then - Actions
          • Game - Display to (All players) the text: 10
          • Set FBSFKPart2 = True
        • Else - Actions
      • Special Effect - Destroy FrostBiteSFX[(Integer A)]
      • Game - Display to (All players) the text: destroyed crystals


Do you understand what i did here? You use the first trigger to turn on a second trigger that has the Action part of the Loop in it, the trigger runs every 1 second until you order it to stop with the first one, so this should work (needs some adjusting i just copy pasted a lot ^^ )

Edit: And the same for your other part ^^
 

Accumilater

New Member
Reaction score
0
Hmmm, that doesn't seem to be working for me
Code:
Frost Bite Test
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to FrostBite
    Actions
        Set FBDamage = (((Real((Level of FrostBite for (Triggering unit)))) x 150.00) + (Real((Intelligence of IceWardenCaster (Include bonuses)))))
        Set FrostBitePoint = (Target point of ability being cast)
        Set FrostBiteTarget = (Target unit of ability being cast)
        Set FrostBiteOff[(Integer A)] = (Position of FrostBiteTarget)
        Set FrostBiteCaster = (Casting unit)
        Set FBSFKPart2 = False
        Set FBDESTROYSFX = False
        Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexA()])
        Trigger - Turn on Frost Bite SFXP1 <gen>
        Wait until (FBSFKPart2 Equal to True), checking every 1.00 seconds
        Trigger - Turn off Frost Bite SFXP1 <gen>
        Trigger - Turn on Frost Bite SFXP2 <gen>
        Wait until (FBDESTROYSFX Equal to True), checking every 1.00 seconds
        Trigger - Turn off Frost Bite SFXP2 <gen>
        Trigger - Turn on Frost Bite Destroy SFX <gen>

Code:
Frost Bite SFXP1
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by -300.00 towards (36.00 x ((Real((Integer A))) - 1.00)) degrees)
                Special Effect - Create a special effect at FrostBiteOff[(Integer A)] using Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal3.mdl
                Set FrostBiteSFX[(Integer A)] = (Last created special effect)
                Unit - Create 1 Frost Bite Dummy for (Owner of FrostBiteCaster) at FrostBiteOff[(Integer A)] facing Default building facing degrees
                Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexA()])
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by 300.00 towards (36.00 x ((Real((Integer A))) - 1.00)) degrees)
                Unit - Order (Last created unit) to Human Archmage - Blizzard FrostBiteOff[(Integer A)]
                Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexA()])
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Integer A) Equal to 10
                    Then - Actions
                        Wait 1.00 seconds
                        Game - Display to (All players) the text: 10
                        Set FBSFKPart2 = True
                    Else - Actions
        Custom script:   call RemoveLocation(udg_FrostBitePoint)

Code:
Frost Bite SFXP2
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FBSFKPart2 Equal to True
            Then - Actions
                For each (Integer A) from 1 to 90, do (Actions)
                    Loop - Actions
                        Game - Display to (All players) the text: destroyed crystals
                        Special Effect - Destroy FrostBiteSFX[(Integer A)]
                        Set FrostBitePoint2[(Integer A)] = (FrostBitePoint offset by -100.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Set FrostBitePoint3[(Integer A)] = (FrostBitePoint offset by -200.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by -300.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Special Effect - Create a special effect at FrostBitePoint2[(Integer A)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                        Set FBP2SFX[(Integer A)] = (Last created special effect)
                        Special Effect - Create a special effect at FrostBitePoint3[(Integer A)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                        Set FBP3SFX[(Integer A)] = (Last created special effect)
                        Special Effect - Create a special effect at FrostBiteOff[(Integer A)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                        Set FBP4SFX[(Integer A)] = (Last created special effect)
                        Custom script:   call RemoveLocation(udg_FrostBitePoint2[GetForLoopIndexA()])
                        Custom script:   call RemoveLocation(udg_FrostBitePoint3[GetForLoopIndexA()])
                        Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexA()])
                        Set FrostBitePoint2[(Integer A)] = (FrostBitePoint offset by 100.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Set FrostBitePoint3[(Integer A)] = (FrostBitePoint offset by 200.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by 300.00 towards (4.00 x ((Real((Integer A))) - 1.00)) degrees)
                        Custom script:   call RemoveLocation(udg_FrostBitePoint2[GetForLoopIndexA()])
                        Custom script:   call RemoveLocation(udg_FrostBitePoint3[GetForLoopIndexA()])
                        Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexA()])
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Integer A) Equal to 90
                            Then - Actions
                                Game - Display to (All players) the text: 90
                                Wait 1.00 seconds
                                Set FBDESTROYSFX = True
                            Else - Actions
            Else - Actions

Code:
Frost Bite Destroy SFX
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FBDESTROYSFX Equal to True
            Then - Actions
                For each (Integer A) from 1 to 100, do (Actions)
                    Loop - Actions
                        Special Effect - Destroy FBP2SFX[(Integer A)]
                        Special Effect - Destroy FBP3SFX[(Integer A)]
                        Special Effect - Destroy FBP4SFX[(Integer A)]
            Else - Actions
 

Accumilater

New Member
Reaction score
0
k well i took them out and its still doing the same thing as before. Its not doing the 2nd part of the special effects at all.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Hm, okay? Can you explain it a bit more?

Does the First Special effect (the crystals) work as it should? Do they get destroyed? Where exactly does the trigger stop functioning ^^

I see some unnecessary things, like
Trigger:
  • If - Conditions
    • FBSFKPart2 Equal to True


That you don't really need (since your checking it before) But it shouldn't effect your triggers really ^^

So please, explain more ^^
 

Accumilater

New Member
Reaction score
0
Yeah i know theres some unecessary parts in there. Well it makes the crystals right, but for some reason it doesnt really destroy them, until after maybe 5 or 6 seconds, i have no clue why... sometimes the 2nd part of the sfx will work, it destroys those... then a few seconds later it'll destroy all of the crystals except for 1, which it then waits another 1-2 seconds and then that ones finally destroyed, its confusing me.

Edit: Heres what i have now
Code:
Frost Bite Test2
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to FrostBite
    Actions
        Game - Display to (All players) the text: should work  
        Set FBDamage = (((Real((Level of FrostBite for (Triggering unit)))) x 150.00) + (Real((Intelligence of IceWardenCaster (Include bonuses)))))
        Set FrostBitePoint = (Target point of ability being cast)
        Set FrostBiteTarget = (Target unit of ability being cast)
        Set FrostBiteOff[(Integer A)] = (Position of FrostBiteTarget)
        Set FrostBiteCaster = (Casting unit)
        Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexA()])
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by -300.00 towards (36.00 x ((Real((Integer A))) - 1.00)) degrees)
                Special Effect - Create a special effect at FrostBiteOff[(Integer A)] using Doodads\Icecrown\Rocks\Icecrown_Crystal\Icecrown_Crystal3.mdl
                Set FrostBiteSFX[(Integer A)] = (Last created special effect)
                Special Effect - Destroy FrostBiteSFX[(Integer A)]
                Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexA()])
                Set FrostBiteOff[(Integer A)] = (FrostBitePoint offset by 300.00 towards (36.00 x ((Real((Integer A))) - 1.00)) degrees)
                Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexA()])
                Game - Display to (All players) the text: destroyed crystals
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Integer A) Equal to 10
                    Then - Actions
                        Game - Display to (All players) the text: 10
                        Wait 1.00 seconds
                        For each (Integer B) from 1 to 90, do (Actions)
                            Loop - Actions
                                Set FrostBitePoint2[(Integer B)] = (FrostBitePoint offset by -100.00 towards (4.00 x ((Real((Integer B))) - 1.00)) degrees)
                                Set FrostBitePoint3[(Integer B)] = (FrostBitePoint offset by -200.00 towards (4.00 x ((Real((Integer B))) - 1.00)) degrees)
                                Set FrostBiteOff[(Integer B)] = (FrostBitePoint offset by -300.00 towards (4.00 x ((Real((Integer B))) - 1.00)) degrees)
                                Special Effect - Create a special effect at FrostBitePoint2[(Integer B)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                                Set FBP2SFX[(Integer B)] = (Last created special effect)
                                Special Effect - Create a special effect at FrostBitePoint3[(Integer B)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                                Set FBP3SFX[(Integer B)] = (Last created special effect)
                                Special Effect - Create a special effect at FrostBiteOff[(Integer B)] using Doodads\Cinematic\FrostTrapUp\FrostTrapUp.mdl
                                Set FBP4SFX[(Integer B)] = (Last created special effect)
                                Unit - Create 1 Frost Bite Dummy for (Owner of FrostBiteCaster) at FrostBiteOff[(Integer B)] facing Default building facing degrees
                                Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                                Unit - Order (Last created unit) to Human Archmage - Blizzard FrostBiteOff[(Integer B)]
                                Custom script:   call RemoveLocation(udg_FrostBitePoint2[GetForLoopIndexB()])
                                Custom script:   call RemoveLocation(udg_FrostBitePoint3[GetForLoopIndexB()])
                                Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexB()])
                                Set FrostBitePoint2[(Integer B)] = (FrostBitePoint offset by 100.00 towards (4.00 x ((Real((Integer B))) - 1.00)) degrees)
                                Set FrostBitePoint3[(Integer B)] = (FrostBitePoint offset by 200.00 towards (4.00 x ((Real((Integer B))) - 1.00)) degrees)
                                Set FrostBiteOff[(Integer B)] = (FrostBitePoint offset by 300.00 towards (4.00 x ((Real((Integer B))) - 1.00)) degrees)
                                Custom script:   call RemoveLocation(udg_FrostBitePoint2[GetForLoopIndexB()])
                                Custom script:   call RemoveLocation(udg_FrostBitePoint3[GetForLoopIndexB()])
                                Custom script:   call RemoveLocation(udg_FrostBiteOff[GetForLoopIndexB()])
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Integer B) Equal to 90
                                    Then - Actions
                                        Game - Display to (All players) the text: 90
                                        Wait 1.00 seconds
                                        For each (Integer A) from 1 to 100, do (Actions)
                                            Loop - Actions
                                                Special Effect - Destroy FBP2SFX[(Integer A)]
                                                Special Effect - Destroy FBP3SFX[(Integer A)]
                                                Special Effect - Destroy FBP4SFX[(Integer A)]
                                    Else - Actions
                    Else - Actions
        Custom script:   call RemoveLocation(udg_FrostBitePoint)
        Custom script:   call RemoveLocation(udg_FrostBitePoint)

This works fine, the waits are needed else the 2nd graphics wont show up, but the only problem is i believe are the waits, it takes about 5 seconds for the crystals to be destroyed, everything works fine, 2nd sfx part goes away at about 2.5 seconds, thats when the crystals should go too, but they're not.
 
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