- Joined
- May 11, 2012
- Messages
- 2,108
Can someone help me with this spell?
It works normally, but when cast it 2 times (MUI), it gets screwed up...
I can't get it to work
What it does: Desecrates area in front and cr8es 4 units that spin around towards the point, and when it reaches it, they are killed and deals dmg again
It works normally, but when cast it 2 times (MUI), it gets screwed up...
I can't get it to work
What it does: Desecrates area in front and cr8es 4 units that spin around towards the point, and when it reaches it, they are killed and deals dmg again
-
Shadow Blast Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_Damage[1] = 300.00
-
Set SB_Damage[2] = 600.00
-
Set SB_Damage[3] = 1200.00
-
Set SB_Damage[4] = 2400.00
-
Set SB_Damage[5] = 4800.00
-
Set SB_Damage2[1] = 200.00
-
Set SB_Damage2[2] = 400.00
-
Set SB_Damage2[3] = 800.00
-
Set SB_Damage2[4] = 1600.00
-
Set SB_Damage2[5] = 3200.00
-
Set SB_ShadowSpawnType = Dummy Shadow Blast
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
Shadow Blast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Shadow Blast
-
-
Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_MaxIndex = (SB_MaxIndex + 1)
-
Set SB_TrigUnit[SB_MaxIndex] = (Triggering unit)
-
Set SB_SpellLvl[SB_MaxIndex] = (Level of Shadow Blast for SB_TrigUnit[SB_MaxIndex])
-
Set SB_DamageUnit[SB_MaxIndex] = SB_Damage[SB_SpellLvl[SB_MaxIndex]]
-
Set SB_DamageUnit2[SB_MaxIndex] = SB_Damage2[SB_SpellLvl[SB_MaxIndex]]
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_Point = (Target point of ability being cast)
-
Set SB_UnitGroup = (Units within 450.00 of SB_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of SB_TrigUnit[SB_MaxIndex])) Equal to True) and ((Life o
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Unit - Create 1 Dummy Shadow Blast2 for (Owner of SB_TrigUnit[SB_MaxIndex]) at SB_Point facing Default building facing degrees
-
Set SB_Dummy[SB_MaxIndex] = (Last created unit)
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_Point2[1] = (SB_Point offset by 450.00 towards 90.00 degrees)
-
Unit - Create 1 SB_ShadowSpawnType for (Owner of SB_TrigUnit[SB_MaxIndex]) at SB_Point2[1] facing SB_Point
-
Set SB_ShadowSpawn1[SB_MaxIndex] = (Last created unit)
-
Set SB_Point2[2] = (SB_Point offset by 450.00 towards 180.00 degrees)
-
Unit - Create 1 SB_ShadowSpawnType for (Owner of SB_TrigUnit[SB_MaxIndex]) at SB_Point2[2] facing SB_Point
-
Set SB_ShadowSpawn2[SB_MaxIndex] = (Last created unit)
-
Set SB_Point2[3] = (SB_Point offset by 450.00 towards 270.00 degrees)
-
Unit - Create 1 SB_ShadowSpawnType for (Owner of SB_TrigUnit[SB_MaxIndex]) at SB_Point2[3] facing SB_Point
-
Set SB_ShadowSpawn3[SB_MaxIndex] = (Last created unit)
-
Set SB_Point2[4] = (SB_Point offset by 450.00 towards 360.00 degrees)
-
Unit - Create 1 SB_ShadowSpawnType for (Owner of SB_TrigUnit[SB_MaxIndex]) at SB_Point2[4] facing SB_Point
-
Set SB_ShadowSpawn4[SB_MaxIndex] = (Last created unit)
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Unit Group - Pick every unit in SB_UnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Cause SB_TrigUnit[SB_MaxIndex] to damage (Picked unit), dealing SB_DamageUnit[SB_SpellLvl[SB_MaxIndex]] damage of attack type Spells and damage type Normal
-
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SB_MaxIndex Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Shadow Blast Loop <gen>
-
-
Else - Actions
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_SB_Point)
-
Custom script: call RemoveLocation(udg_SB_Point2[1])
-
Custom script: call RemoveLocation(udg_SB_Point2[2])
-
Custom script: call RemoveLocation(udg_SB_Point2[3])
-
Custom script: call RemoveLocation(udg_SB_Point2[4])
-
Custom script: call DestroyGroup(udg_SB_UnitGroup)
-
Custom script: set udg_SB_Point = null
-
Custom script: set udg_SB_Point2[1] = null
-
Custom script: set udg_SB_Point2[2] = null
-
Custom script: set udg_SB_Point2[3] = null
-
Custom script: set udg_SB_Point2[4] = null
-
Custom script: set udg_SB_UnitGroup = null
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
Shadow Blast Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer TempInt) from 1 to SB_MaxIndex, do (Actions)
-
Loop - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_Point = (Position of SB_Dummy[TempInt])
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_Point2[1] = (Position of SB_ShadowSpawn1[TempInt])
-
Set SB_Point2[2] = (Position of SB_ShadowSpawn2[TempInt])
-
Set SB_Point2[3] = (Position of SB_ShadowSpawn3[TempInt])
-
Set SB_Point2[4] = (Position of SB_ShadowSpawn4[TempInt])
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Distance between SB_Point and SB_Point2[1]) Less than or equal to 25.00
-
(Distance between SB_Point and SB_Point2[2]) Less than or equal to 25.00
-
(Distance between SB_Point and SB_Point2[3]) Less than or equal to 25.00
-
(Distance between SB_Point and SB_Point2[4]) Less than or equal to 25.00
-
-
-
-
Then - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Unit - Remove SB_ShadowSpawn1[TempInt] from the game
-
Unit - Remove SB_ShadowSpawn2[TempInt] from the game
-
Unit - Remove SB_ShadowSpawn3[TempInt] from the game
-
Unit - Remove SB_ShadowSpawn4[TempInt] from the game
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Unit - Kill SB_Dummy[TempInt]
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_UnitGroup = (Units within 450.00 of SB_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of SB_TrigUnit[SB_MaxIndex])) Equal to True) and ((Life o
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Unit Group - Pick every unit in SB_UnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Cause SB_TrigUnit[TempInt] to damage (Picked unit), dealing SB_DamageUnit2[SB_SpellLvl[TempInt]] damage of attack type Spells and damage type Normal
-
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Special Effect - Create a special effect at SB_Point using war3mapImported\DarkBlast.mdx
-
Special Effect - Destroy (Last created special effect)
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_TrigUnit[TempInt] = SB_TrigUnit[SB_MaxIndex]
-
Set SB_TrigUnit[SB_MaxIndex] = No unit
-
Set SB_Dummy[TempInt] = SB_Dummy[SB_MaxIndex]
-
Set SB_Dummy[SB_MaxIndex] = No unit
-
Set SB_ShadowSpawn1[TempInt] = SB_ShadowSpawn1[SB_MaxIndex]
-
Set SB_ShadowSpawn1[SB_MaxIndex] = No unit
-
Set SB_ShadowSpawn2[TempInt] = SB_ShadowSpawn2[SB_MaxIndex]
-
Set SB_ShadowSpawn2[SB_MaxIndex] = No unit
-
Set SB_ShadowSpawn3[TempInt] = SB_ShadowSpawn3[SB_MaxIndex]
-
Set SB_ShadowSpawn3[SB_MaxIndex] = No unit
-
Set SB_ShadowSpawn4[TempInt] = SB_ShadowSpawn4[SB_MaxIndex]
-
Set SB_ShadowSpawn4[SB_MaxIndex] = No unit
-
Set SB_SpellLvl[TempInt] = SB_SpellLvl[SB_MaxIndex]
-
Set SB_DamageUnit[TempInt] = SB_DamageUnit[SB_MaxIndex]
-
Set SB_DamageUnit2[TempInt] = SB_DamageUnit2[SB_MaxIndex]
-
Set SB_MaxIndex = (SB_MaxIndex - 1)
-
Set TempInt = (TempInt - 1)
-
-------- ------------------------------------------------------------------------------------- --------
-
-
Else - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set SB_Angle[1] = (Angle from SB_Point2[1] to SB_Point)
-
Set SB_Angle[2] = (Angle from SB_Point2[2] to SB_Point)
-
Set SB_Angle[3] = (Angle from SB_Point2[3] to SB_Point)
-
Set SB_Angle[4] = (Angle from SB_Point2[4] to SB_Point)
-
Set SB_Point3[1] = (SB_Point2[1] offset by 15.00 towards SB_Angle[1] degrees)
-
Set SB_Point3[2] = (SB_Point2[2] offset by 15.00 towards SB_Angle[2] degrees)
-
Set SB_Point3[3] = (SB_Point2[3] offset by 15.00 towards SB_Angle[3] degrees)
-
Set SB_Point3[4] = (SB_Point2[4] offset by 15.00 towards SB_Angle[4] degrees)
-
Unit - Move SB_ShadowSpawn1[TempInt] instantly to SB_Point3[1]
-
Unit - Move SB_ShadowSpawn2[TempInt] instantly to SB_Point3[2]
-
Unit - Move SB_ShadowSpawn3[TempInt] instantly to SB_Point3[3]
-
Unit - Move SB_ShadowSpawn4[TempInt] instantly to SB_Point3[4]
-
Custom script: call RemoveLocation(udg_SB_Point3[1])
-
Custom script: call RemoveLocation(udg_SB_Point3[2])
-
Custom script: call RemoveLocation(udg_SB_Point3[3])
-
Custom script: call RemoveLocation(udg_SB_Point3[4])
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_SB_Point)
-
Custom script: call RemoveLocation(udg_SB_Point2[1])
-
Custom script: call RemoveLocation(udg_SB_Point2[2])
-
Custom script: call RemoveLocation(udg_SB_Point2[3])
-
Custom script: call RemoveLocation(udg_SB_Point2[4])
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: set udg_SB_Point = null
-
Custom script: set udg_SB_Point2[1] = null
-
Custom script: set udg_SB_Point2[2] = null
-
Custom script: set udg_SB_Point2[3] = null
-
Custom script: set udg_SB_Point2[4] = null
-
Custom script: set udg_SB_Point3[1] = null
-
Custom script: set udg_SB_Point3[2] = null
-
Custom script: set udg_SB_Point3[3] = null
-
Custom script: set udg_SB_Point3[4] = null
-
-------- ------------------------------------------------------------------------------------- --------
-
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
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-
Last edited: