For whatever reason my spell i've made doesn't deal any damage.
The ability makes blades circle the caster and they hit enemy land units, breaking and dealing damage.
All of it works other than when the blades break they don't do any damage and I don't know why!!!
Here's the triggers:
EDIT: Sorted, the target was being set as a random unit from the wrong group!!!
The ability makes blades circle the caster and they hit enemy land units, breaking and dealing damage.
All of it works other than when the blades break they don't do any damage and I don't know why!!!
Here's the triggers:
-
Spinning Blades Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Spinning Blades
-
Actions
- Set TempUnit = (Casting unit)
- Set TempInt = ((4 + (1 x (Level of Spinning Blades for TempUnit))) + ((Agility of TempUnit (Include bonuses)) / 50))
- Set Spell_CasterPoint = (Position of TempUnit)
-
For each (Integer A) from 1 to TempInt, do (Actions)
-
Loop - Actions
- Set SB_MaxIndex = (SB_MaxIndex + 1)
- Set SB_CasterUnit[SB_MaxIndex] = TempUnit
- Set SB_Angle[SB_MaxIndex] = ((360.00 / (Real(TempInt))) x (Real((Integer A))))
- Set Spell_TargetPoint = (Spell_CasterPoint offset by 250.00 towards SB_Angle[SB_MaxIndex] degrees)
- Unit - Create 1 Dummy (Spinning Blades) for (Owner of TempUnit) at Spell_TargetPoint facing (SB_Angle[SB_MaxIndex] + 90.00) degrees
- Set SB_DummyUnit[SB_MaxIndex] = (Last created unit)
- Set SB_Dmg[SB_MaxIndex] = ((50.00 + (50.00 x (Real((Level of Spinning Blades for SB_CasterUnit[SB_MaxIndex]))))) + ((Real((Agility of SB_CasterUnit[SB_MaxIndex] (Include bonuses)))) x (5.00 + (5.00 x (Real((Level of Spinning Blades for SB_CasterUnit[SB_MaxIndex])))))))
- Special Effect - Create a special effect at Spell_TargetPoint using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_Spell_TargetPoint)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SB_MaxIndex Greater than or equal to 1
-
Then - Actions
- Trigger - Turn on Spinning Blades Loop <gen>
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_Spell_CasterPoint)
-
Events
-
Spinning Blades Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer SB_LoopInt) from 1 to SB_MaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (SB_CasterUnit[SB_LoopInt] is alive) Equal to True
-
Then - Actions
- Set Spell_CasterPoint = (Position of SB_CasterUnit[SB_LoopInt])
- Set SB_Angle[SB_LoopInt] = (SB_Angle[SB_LoopInt] + 4.00)
- Set Spell_TargetPoint = (Spell_CasterPoint offset by 250.00 towards SB_Angle[SB_LoopInt] degrees)
- Unit - Move SB_DummyUnit[SB_LoopInt] instantly to Spell_TargetPoint, facing (SB_Angle[SB_LoopInt] + 90.00) degrees
- Set Spell_UnitGroup = (Units within 100.00 of Spell_TargetPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of SB_CasterUnit[SB_LoopInt])) Equal to True))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Spell_UnitGroup) Greater than or equal to 1
-
Then - Actions
- Set Spell_TargetUnit = (Random unit from TempUnitGroup)
- Unit - Cause SB_CasterUnit[SB_LoopInt] to damage Spell_TargetUnit, dealing SB_Dmg[SB_LoopInt] damage of attack type Spells and damage type Universal
- Unit - Kill SB_DummyUnit[SB_LoopInt]
- -------- DeIndex --------
- Set SB_Angle[SB_LoopInt] = SB_Angle[SB_MaxIndex]
- Set SB_CasterUnit[SB_LoopInt] = SB_CasterUnit[SB_MaxIndex]
- Set SB_Dmg[SB_LoopInt] = SB_Dmg[SB_MaxIndex]
- Set SB_DummyUnit[SB_LoopInt] = SB_DummyUnit[SB_MaxIndex]
- Set SB_MaxIndex = (SB_MaxIndex - 1)
- Set SB_LoopInt = (SB_LoopInt - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SB_MaxIndex Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_Spell_CasterPoint)
- Custom script: call RemoveLocation(udg_Spell_TargetPoint)
- Custom script: call DestroyGroup(udg_Spell_UnitGroup)
-
Else - Actions
- -------- DeIndex --------
- Set SB_Angle[SB_LoopInt] = SB_Angle[SB_MaxIndex]
- Set SB_CasterUnit[SB_LoopInt] = SB_CasterUnit[SB_MaxIndex]
- Set SB_Dmg[SB_LoopInt] = SB_Dmg[SB_MaxIndex]
- Set SB_DummyUnit[SB_LoopInt] = SB_DummyUnit[SB_MaxIndex]
- Set SB_MaxIndex = (SB_MaxIndex - 1)
- Set SB_LoopInt = (SB_LoopInt - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SB_MaxIndex Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer SB_LoopInt) from 1 to SB_MaxIndex, do (Actions)
-
Events
Last edited: