Nova Spell... Why?

NeuroToxin

New Member
Reaction score
46
Okay, so I made this nova spell, and for some reason its not working, sometimes the dummy units just stay in one spot and move when the caster moves, other times they just stay circling. Nevertheless, Heres the map, and/or triggers.
Trigger:
  • SNCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Soul Nova
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SNInteger Greater than or equal to 3000
        • Then - Actions
          • Set SS_Integer = 0
        • Else - Actions
          • Set SS_Integer = (SNInteger + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Circling_Units[(Custom value of (Triggering unit))]) Less than 1
        • Then - Actions
          • Set SS_Integer = (SNInteger - 1)
        • Else - Actions
          • Set SNSouls = (3 + ((Level of (Ability being cast) for (Triggering unit)) x 2))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in Circling_Units[(Custom value of (Triggering unit))]) Less than SNSouls
            • Then - Actions
              • Set SNDummies = Circling_Units[(Custom value of (Triggering unit))]
              • Unit Group - Pick every unit in SNDummies and do (Actions)
                • Loop - Actions
                  • Set SNDummy[SNInteger] = (Picked unit)
                  • Unit Group - Add SNDummy[SNInteger] to SNIsMiddle
                  • Unit Group - Add SNDummy[SNInteger] to SS_SentGroup
                  • Unit Group - Remove SNDummy[SNInteger] from Circling_Units[(Custom value of (Triggering unit))]
                  • Animation - Change (Triggering unit) flying height to 100.00 at 600.00
                  • Set SS_Integer = (SNInteger + 1)
              • Custom script: call DestroyGroup(udg_SNDummies)
            • Else - Actions
              • Set SNDummies = (Random SNSouls units from Circling_Units[(Custom value of (Triggering unit))])
              • Unit Group - Pick every unit in SNDummies and do (Actions)
                • Loop - Actions
                  • Set SNDummy[SNInteger] = (Picked unit)
                  • Unit Group - Add SNDummy[SNInteger] to SNIsMiddle
                  • Unit Group - Add SNDummy[SNInteger] to SS_SentGroup
                  • Unit Group - Remove SNDummy[SNInteger] from Circling_Units[(Custom value of (Triggering unit))]
                  • Animation - Change (Triggering unit) flying height to 100.00 at 600.00
                  • Set SS_Integer = (SNInteger + 1)
              • Custom script: call DestroyGroup(udg_SNDummies)
          • Set SNCaster[SNInteger] = (Triggering unit)
          • Custom script: call DestroyGroup(udg_SNDummies)
          • Trigger - Turn on SNLoop <gen>

Trigger:
  • SNLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 0 to SNInteger, do (Actions)
        • Loop - Actions
          • Set SNDummyloc = (Position of SNDummy[(Integer A)])
          • Set SNCasterloc = (Position of SNCaster[(Integer A)])
          • Set SNAoeoffset = (SNCasterloc offset by (500.00 + ((Real((Level of Soul Nova for SNCaster[(Integer A)]))) x 100.00)) towards SNAngle[(Integer A)] degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((SNDummy[(Integer A)] is in SNIsMiddle) Equal to True) and ((Distance between SNDummyloc and SNCasterloc) Greater than or equal to 50.00)
            • Then - Actions
              • Set SNMiddleAngle[(Integer A)] = (Angle from SNDummyloc to SNCasterloc)
              • Set SNOffset = (SNDummyloc offset by 20.00 towards SNAngle[(Integer A)] degrees)
              • Unit - Move SNDummy[(Integer A)] instantly to SNOffset, facing SNAngle[(Integer A)] degrees
              • Custom script: call RemoveLocation(udg_SNDummyloc)
              • Custom script: call RemoveLocation(udg_SNCasterloc)
              • Custom script: call RemoveLocation(udg_SNOffset)
            • Else - Actions
              • Game - Display to (All players) the text: Removing from Middl...
              • Unit Group - Remove SNDummy[(Integer A)] from SNIsMiddle
              • Set SNAngle[(Integer A)] = (SNMiddleAngle[(Integer A)] + 180.00)
              • Set SNOffset = (SNCasterloc offset by 30.00 towards SNAngle[(Integer A)] degrees)
              • Set SNDamagingUnits = (Units within 50.00 of Dummyloc matching (((Matching unit) Not equal to SNCaster[(Integer A)]) and (((Owner of (Matching unit)) is an ally of (Owner of (Matching unit))) Equal to False)))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in SNDamagingUnits) Greater than 0
                • Then - Actions
                  • Unit Group - Pick every unit in SNDamagingUnits and do (Actions)
                    • Loop - Actions
                      • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Unit - Cause SNCaster[(Integer A)] to damage (Picked unit), dealing (50.00 + ((Real((Level of Soul Nova for SNCaster[(Integer A)]))) x 50.00)) damage of attack type Spells and damage type Normal
                      • Custom script: call RemoveLocation(udg_SNOffset)
                      • Custom script: call RemoveLocation(udg_SNDummyloc)
                      • Custom script: call RemoveLocation(udg_SNCasterloc)
                  • Unit - Remove SNDummy[(Integer A)] from the game
                  • Custom script: call DestroyGroup(udg_SNDamagingUnits)
                • Else - Actions
                  • Custom script: call DestroyGroup(udg_SNDamagingUnits)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between SNDummyloc and SNAoeoffset) Greater than or equal to 50.00
                • Then - Actions
                  • Game - Display to (All players) the text: Moving SNDummy
                  • Unit - Move SNDummy[(Integer A)] instantly to SNOffset, facing SNAngle[(Integer A)] degrees
                  • Custom script: call RemoveLocation(udg_SNOffset)
                  • Custom script: call RemoveLocation(udg_SNDummyloc)
                  • Custom script: call RemoveLocation(udg_SNCasterloc)
                • Else - Actions
                  • Unit - Remove SNDummy[(Integer A)] from the game
                  • Custom script: call RemoveLocation(udg_SNOffset)
                  • Custom script: call RemoveLocation(udg_SNDummyloc)
                  • Custom script: call RemoveLocation(udg_SNCasterloc)
 

Attachments

  • Soulstealer Pack.w3x
    40.3 KB · Views: 171

Weep

Godspeed to the sound of the pounding
Reaction score
400
SNCast:
Code:
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SNInteger Greater than or equal to 3000
            Then - Actions
                Set [COLOR="red"]SS_Integer[/COLOR] = 0
            Else - Actions
                Set [COLOR="red"]SS_Integer[/COLOR] = (SNInteger + 1)
I think you meant SNInteger. You also made that mistake further down, thrice.

Code:
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in Circling_Units[(Custom value of (Triggering unit))]) Less than SNSouls
                    Then - Actions
                        Set SNDummies = Circling_Units[(Custom value of (Triggering unit))]
                        Unit Group - Pick every unit in SNDummies and do (Actions)
                            Loop - Actions
                                Set SNDummy[SNInteger] = (Picked unit)
                                Unit Group - Add SNDummy[SNInteger] to SNIsMiddle
                                Unit Group - Add SNDummy[SNInteger] to SS_SentGroup
                                Unit Group - Remove SNDummy[SNInteger] from Circling_Units[(Custom value of (Triggering unit))]
                                Animation - Change ([COLOR="mediumturquoise"]Triggering unit[/COLOR]) flying height to 100.00 at 600.00
                                [COLOR="lime"]Set SS_Integer = (SNInteger + 1)[/COLOR]
                        [COLOR="red"]Custom script:   call DestroyGroup(udg_SNDummies)[/COLOR]
                    Else - Actions
                        Set SNDummies = (Random SNSouls units from Circling_Units[(Custom value of (Triggering unit))])
                        Unit Group - Pick every unit in SNDummies and do (Actions)
                            Loop - Actions
                                Set SNDummy[SNInteger] = (Picked unit)
                                Unit Group - Add SNDummy[SNInteger] to SNIsMiddle
                                Unit Group - Add SNDummy[SNInteger] to SS_SentGroup
                                Unit Group - Remove SNDummy[SNInteger] from Circling_Units[(Custom value of (Triggering unit))]
                                Animation - Change ([COLOR="mediumturquoise"]Triggering unit[/COLOR]) flying height to 100.00 at 600.00
                                [COLOR="lime"]Set SS_Integer = (SNInteger + 1)[/COLOR]
                        Custom script:   call DestroyGroup(udg_SNDummies)
                [COLOR="blue"]Set SNCaster[SNInteger] = (Triggering unit)[/COLOR]
               [COLOR="red"] Custom script:   call DestroyGroup(udg_SNDummies)[/COLOR]
Remove the lines in red; at those places, you never had created a new group and don't need to destroy it. In fact, since you had just set SNDummies to be equal to (literally, the same object) as Circling_Units[(Custom value of (Triggering unit))], you're destroying that when it's still in use. The one I didn't highlight is OK because you did set SNDummies to be a new group there.

You need to copy the line in blue above both lines in green, since the triggering unit needs to be associated with every dummy.

The sea green (lol) parts are probably supposed to be Picked unit.

SNLoop:
Code:
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 0 to SNInteger, do (Actions)
            Loop - Actions
                Set SNDummyloc = (Position of SNDummy[(Integer A)])
                Set SNCasterloc = (Position of SNCaster[(Integer A)])
                Set SNAoeoffset = (SNCasterloc offset by (500.00 + ((Real((Level of Soul Nova  for SNCaster[(Integer A)]))) x 100.00)) towards SNAngle[(Integer A)] degrees)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((SNDummy[(Integer A)] is in SNIsMiddle) Equal to True) and ((Distance between SNDummyloc and SNCasterloc) Greater than or equal to 50.00)
                    Then - Actions
                        Set SNMiddleAngle[(Integer A)] = (Angle from SNDummyloc to SNCasterloc)
                        Set SNOffset = (SNDummyloc offset by 20.00 towards [COLOR="yellow"]SNAngle[/COLOR][(Integer A)] degrees)
                        Unit - Move SNDummy[(Integer A)] instantly to SNOffset, facing SNAngle[(Integer A)] degrees
                        [COLOR="red"]Custom script:   call RemoveLocation(udg_SNDummyloc)
                        Custom script:   call RemoveLocation(udg_SNCasterloc)[/COLOR]
                        Custom script:   call RemoveLocation(udg_SNOffset)
                    Else - Actions
                        Game - Display to (All players) the text: Removing from Middl...
                        Unit Group - Remove SNDummy[(Integer A)] from SNIsMiddle
                        Set SNAngle[(Integer A)] = (SNMiddleAngle[(Integer A)] + 180.00)
                        Set SNOffset = ([COLOR="darkorchid"]SNCasterloc[/COLOR] offset by 30.00 towards SNAngle[(Integer A)] degrees)
                        Set SNDamagingUnits = (Units within 50.00 of [COLOR="mediumturquoise"]Dummyloc[/COLOR] matching (((Matching unit) Not equal to SNCaster[(Integer A)]) and (((Owner of (Matching unit)) is an ally of (Owner of (Matching unit))) Equal to False)))
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Number of units in SNDamagingUnits) Greater than 0
                            Then - Actions
                                Unit Group - Pick every unit in SNDamagingUnits and do (Actions)
                                    Loop - Actions
                                        Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Unit - Cause SNCaster[(Integer A)] to damage (Picked unit), dealing (50.00 + ((Real((Level of Soul Nova  for SNCaster[(Integer A)]))) x 50.00)) damage of attack type Spells and damage type Normal
                                        [COLOR="magenta"]Custom script:   call RemoveLocation(udg_SNOffset)[/COLOR]
                                        [COLOR="red"]Custom script:   call RemoveLocation(udg_SNDummyloc)
                                        Custom script:   call RemoveLocation(udg_SNCasterloc)[/COLOR]
                                Unit - Remove SNDummy[(Integer A)] from the game
                                Custom script:   call DestroyGroup(udg_SNDamagingUnits)
                            Else - Actions
                                Custom script:   call DestroyGroup(udg_SNDamagingUnits)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Distance between SNDummyloc and SNAoeoffset) Greater than or equal to 50.00
                            Then - Actions
                                Game - Display to (All players) the text: Moving SNDummy
                                Unit - Move SNDummy[(Integer A)] instantly to SNOffset, facing SNAngle[(Integer A)] degrees
                                Custom script:   call RemoveLocation(udg_SNOffset)
                                [COLOR="red"]Custom script:   call RemoveLocation(udg_SNDummyloc)
                                Custom script:   call RemoveLocation(udg_SNCasterloc)[/COLOR]
                            Else - Actions
                                Unit - Remove SNDummy[(Integer A)] from the game
                                Custom script:   call RemoveLocation(udg_SNOffset)
                                [COLOR="red"]Custom script:   call RemoveLocation(udg_SNDummyloc)
                                Custom script:   call RemoveLocation(udg_SNCasterloc)[/COLOR]
                [COLOR="blue"]HERE![/COLOR]
The lines in red should be removed and instead put on the blue line, since you're not done using those variables until then. The line in pink should be totally removed for the same reason. The part in sea green (lol) probably is supposed to be SNDummyloc.

The part in yellow is probably supposed to be SNMiddleAngle. And finally, the part in purple is probably supposed to be SNDummyloc.

There. :p You really need to learn to debug yourself; I can't keep doing this, it's too much work. :eek:
 

NeuroToxin

New Member
Reaction score
46
It's still not working, they just sit on the ground.
But still, thanks a lot.
 

Attachments

  • Soulstealer Pack.w3x
    40.1 KB · Views: 169

Weep

Godspeed to the sound of the pounding
Reaction score
400
You're still mistakenly using SS_Integer twice in SNCast, below where you're changing the dummy's flying height. Also, why'd you make it -20 for SNOffset in SNLoop? Positive 20 was right.
 

NeuroToxin

New Member
Reaction score
46
Because I figured that if you're adding offset, then you're simply moving him outwards, Whereas if you remove it, then it goes inwards. It just didn't make sense to be a positive number
edit: Last night, it worked after I fixed that, BUT, for some reason, I added this,
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Distance between SNDummyloc and SNCasterloc) Greater than or equal to 300.00
    • Then - Actions
      • Set SNMiddleAngle[(Integer A)] = (Angle from SNDummyloc to SNCasterloc)
      • Set SNOffset = (SNDummyloc offset by 20.00 towards SNMiddleAngle[(Integer A)] degrees)
      • Unit - Move SNDummy[(Integer A)] instantly to SNOffset, facing SNMiddleAngle[(Integer A)] degrees
      • Custom script: call RemoveLocation(udg_SNOffset)
    • Else - Actions
      • Unit Group - Add SNDummy[(Integer A)] to Circling_Units[(Custom value of SNCaster[(Integer A)])]
      • Unit Group - Remove SNDummy[(Integer A)] from SS_SentGroup

and it doesnt work. They just sit outside, and move when the caster moves.
 

Sartan

New Member
Reaction score
23
post the whole new trigger or uppload the map, would be quite easier to help you if you did
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
I think it's because the dummy gets caught in between the conditions where it's greater than 50 from SNAoeoffset but hasn't yet reached 300 from the caster. It works the first phase because you had added it to SSIsMiddle. I think you're going to need another unit group for another phase.
 

NeuroToxin

New Member
Reaction score
46
Alrighty, wait, couldn't I just add it to SNIsmiddle again?
EDIT: That doesnt make sense, because if the dummy unit isnt in the group then it skips that action, and it cant go backwards in a trigger, also, the unit ISNT in SNIsMiddle either, so it wouldn't trigger that then actions either.
Trigger:
  • ((SNDummy[(Integer A)] is in SNIsMiddle) Equal to True) and ((Distance between SNDummyloc and SNCasterloc) Greater than or equal to 50.00)
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
I dunno. I already posted what I thought was the problem.
 

NeuroToxin

New Member
Reaction score
46
I added another unit group, and it still doesn't work.
Updated map -
 

Attachments

  • Soulstealer Pack.w3x
    53.4 KB · Views: 163
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