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 - Conditions
- 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)
- Loop - Actions
- 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)
- Loop - Actions
- Custom script: call DestroyGroup(udg_SNDummies)
- If - Conditions
- Set SNCaster[SNInteger] = (Triggering unit)
- Custom script: call DestroyGroup(udg_SNDummies)
- Trigger - Turn on SNLoop <gen>
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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)
- Loop - Actions
- Unit - Remove SNDummy[(Integer A)] from the game
- Custom script: call DestroyGroup(udg_SNDamagingUnits)
- Unit Group - Pick every unit in SNDamagingUnits and do (Actions)
- Else - Actions
- Custom script: call DestroyGroup(udg_SNDamagingUnits)
- If - Conditions
- 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)
- If - Conditions
- If - Conditions
- Loop - Actions
- For each (Integer A) from 0 to SNInteger, do (Actions)
- Events