Spell Trigger help

Legacyspy

New Member
Reaction score
19
I've got to triggers which aren't working, and im not sure what im doing wrong.


This is supposed to create a series of waves of frost(based off breath of frost) around the hero in a circular fashion based on the heroes level.
Level 1 should have 1 wave go 180 degrees, and another 360
Level 2 should have waves go at 90, 180, 270, 360
so on.

I've tested this with heroes of level 1 and 31. Each time it only loops twice.
(I only get 2 "moo" messages") And each time there is only 1 wave, or all the waves go in the same direction.
Code:
FrostNova
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Frost Nova 
    Actions
        Set TempPoint = (Position of (Casting unit))
        For each (Integer A) from 1 to (2 x (Hero level of (Casting unit))), do (Actions)
            Loop - Actions
                Game - Display to (All players) the text: moo
                Set FrostWavePoint = (TempPoint offset by 256.00 towards ((Real((Integer A))) x (360.00 / (2.00 x (Real((Hero level of (Casting unit))))))) degrees)
                Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
                Unit - Add Wave of Frost (Level 3) to (Last created unit)
                Unit - Order (Last created unit) to Neutral - Breath Of Frost FrostWavePoint
                Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                Custom script:   call RemoveLocation(udg_FrostWavePoint)
        Custom script:   call RemoveLocation(udg_TempPoint)


This spell is suposed to have dummy units cast chain lightning
on all enemies within 900, then have dummy units at each unit cast chain lightning on the unit if the heroes level is > 11, and again if > 19.

The problem is that only 1 chain lightning is cast.
Code:
Wrath
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Wrath 
    Actions
        Set TempPoint = (Position of (Casting unit))
        Set TempGroup = (Units within 900.00 of TempPoint matching (((Owner of (Matching unit)) is an enemy of (Owner of (Casting unit))) Equal to True))
        Unit Group - Pick every unit in TempGroup and do (Actions)
            Loop - Actions
                Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
                Unit - Add Chain Lightning (Level 3) to (Last created unit)
                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
                Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
        Custom script:   call RemoveLocation(udg_TempPoint)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Hero level of (Casting unit)) Greater than 11
            Then - Actions
                Unit Group - Pick every unit in TempGroup and do (Actions)
                    Loop - Actions
                        Set TempPoint = (Position of (Picked unit))
                        Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
                        Unit - Add Chain Lightning (Level 3) to (Last created unit)
                        Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
                        Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                        Custom script:   call RemoveLocation(udg_TempPoint)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Hero level of (Casting unit)) Greater than 19
            Then - Actions
                Unit Group - Pick every unit in TempGroup and do (Actions)
                    Loop - Actions
                        Set TempPoint = (Position of (Picked unit))
                        Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
                        Unit - Add Chain Lightning (Level 3) to (Last created unit)
                        Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
                        Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                        Custom script:   call RemoveLocation(udg_TempPoint)
            Else - Actions
        Custom script:   call DestroyGroup(udg_TempGroup)
 

thewrongvine

The Evolved Panda Commandant
Reaction score
506
Hey, legacyspy, it's me, thewrongvine. :) Haven't seen you on lately, I think... Ehem.

Why not just make the mana cost 0? Is there a cooldown? Though it won't really affect anything...

For your first ability, there is only one point there. Even if it does cast again because of the loop, the Frost Wave Point will not change since the unit and requirements are the same.

For the second ability, not sure if this is it, but maybe your dummies could be overlapping each other. 99% not. There are no pauses between the casts, so maybe all 3 of them are casting at the same time and the effect overlaps? I'm just making things up to try and solve this...
Just for testing reasons, try adding like a .01+ wait to see what happens, but just for testing. And also, for your conditions for the repeated casts for levels 11 and 19, try doing "Greater than or Equal to". If the hero when you were testing was exactly 11 or 19, it might not work.
 

Flow

New Member
Reaction score
4
Um, I haven't read everything through properly, but if they're supposed to cast it twice in a row but don't, have you made sure the ability has no cooldown?
 

thewrongvine

The Evolved Panda Commandant
Reaction score
506
Um, I haven't read everything through properly, but if they're supposed to cast it twice in a row but don't, have you made sure the ability has no cooldown?

It won't matter, because they are creating multiple dummies. Each dummy only casts the ability once, so there is no difference in cooldowns.

@legacyspy, ty and good luck!
 
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