Where's your de-index?
View attachment 349677
Every value in the index must be reshuffled back into the index.
Let me shamble together something here real quick...
oh and something I noticed:
View attachment 349680
K here's my take on it:
(Should be MUI, anyone is free to twist my arm around to tell me if I made a boo boo~)
Retribution | HIVE
& the Triggers:
Init
Cast
ReTr Init
Events
Map initialization
Conditions
Actions
Set ReTr_Config_Periodic_Timer = 0.05
Trigger - Add to ReTr Loop <gen> the event (Time - Every ReTr_Config_Periodic_Timer seconds of game time)
-------- --------
Set ReTr_Ability_ID = Retribution
-------- --------
Set ReTr_Config_AOE[1] = 300.00
Set ReTr_Config_AOE[2] = 320.00
Set ReTr_Config_AOE[3] = 350.00
-------- --------
Set ReTr_Config_ATK_T = Normal
Set ReTr_Config_DAM_T = Magic
-------- --------
Set ReTr_Config_Damage[1] = 150.00
Set ReTr_Config_Damage[2] = 250.00
Set ReTr_Config_Damage[3] = 350.00
-------- --------
Set ReTr_Config_T_Duration[1] = 5.00
Set ReTr_Config_T_Duration[2] = 5.00
Set ReTr_Config_T_Duration[3] = 5.00
-------- --------
Set ReTr_Config_Tick[1] = 1.00
Set ReTr_Config_Tick[2] = 1.00
Set ReTr_Config_Tick[3] = 1.00
-------- --------
Set ReTr_Config_Size[1] = 0.65
Set ReTr_Config_Size[2] = 0.65
Set ReTr_Config_Size[3] = 0.65
-------- --------
Set ReTr_Config_Z_height[1] = 20.00
Set ReTr_Config_Z_height[2] = 20.00
Set ReTr_Config_Z_height[3] = 20.00
-------- --------
Set ReTr_Config_SFX = war3mapImported\AnnihilationBlast.mdx
Set ReTr_Config_GSFX = war3mapImported\AnnihilationTarget.mdx
-------- --------
Set ReTr_z_Point[0] = (Center of (Playable map area))
Unit - Create 1 Albatross for Neutral Hostile at ReTr_z_Point[0] facing Default building facing degrees
Unit - Add ReTr_Ability_ID to (Last created unit)
Unit - Hide (Last created unit)
Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_ReTr_z_Point[0])
-------- --------
Loop
ReTr Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to ReTr_Ability_ID
Actions
Set ReTr_Index = (ReTr_Index + 1)
Set ReTr_z_Caster[ReTr_Index] = (Triggering unit)
Set ReTr_z_Level[ReTr_Index] = (Level of ReTr_Ability_ID for ReTr_z_Caster[ReTr_Index])
Set ReTr_z_Damage[ReTr_Index] = ReTr_Config_Damage[ReTr_z_Level[ReTr_Index]]
Set ReTr_z_T_Duration[ReTr_Index] = ReTr_Config_T_Duration[ReTr_z_Level[ReTr_Index]]
Set ReTr_z_Point[1] = (Target point of ability being cast)
Special Effect - Create a special effect at ReTr_z_Point[1] using ReTr_Config_GSFX
Special Effect - Set Color of (Last created special effect) to r: 255, g: 255, b: 0
Special Effect - Set Position - Z of (Last created special effect) to ((Position - Z of (Last created special effect)) + ReTr_Config_Z_height[ReTr_z_Level[ReTr_Index]])
Special Effect - Set Scale of (Last created special effect) to ReTr_Config_Size[ReTr_z_Level[ReTr_Index]]
Set ReTr_z_SPEF[ReTr_Index] = (Last created special effect)
Custom script: call RemoveLocation(udg_ReTr_z_Point[1])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ReTr_Index Equal to 1
Then - Actions
Trigger - Turn on ReTr Loop <gen>
Else - Actions
ReTr Loop
Events
Conditions
Actions
-------- --------
For each (Integer ReTr_Loop) from 1 to ReTr_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ReTr_z_T_Duration[ReTr_Loop] Equal to 0.00
Then - Actions
Special Effect - Destroy ReTr_z_SPEF[ReTr_Loop]
Set ReTr_z_Caster[ReTr_Loop] = ReTr_z_Caster[ReTr_Loop]
Set ReTr_z_Level[ReTr_Loop] = ReTr_z_Level[ReTr_Index]
Set ReTr_z_Damage[ReTr_Loop] = ReTr_z_Damage[ReTr_Index]
Set ReTr_z_T_Duration[ReTr_Loop] = ReTr_z_T_Duration[ReTr_Index]
Set ReTr_z_SPEF[ReTr_Loop] = ReTr_z_SPEF[ReTr_Index]
Set ReTr_Index = (ReTr_Index - 1)
Set ReTr_Loop = (ReTr_Loop - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ReTr_Index Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
Set ReTr_z_T_Duration[ReTr_Loop] = (ReTr_z_T_Duration[ReTr_Loop] - ReTr_Config_Periodic_Timer)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(ReTr_z_T_Duration[ReTr_Loop] mod ReTr_Config_Tick[ReTr_z_Level[ReTr_Loop]]) Greater than or equal to (ReTr_Config_Tick[ReTr_z_Level[ReTr_Loop]] - ReTr_Config_Periodic_Timer)
Then - Actions
Set ReTr_z_Point[2] = (Point((Position - X of ReTr_z_SPEF[ReTr_Loop]), (Position - Y of ReTr_z_SPEF[ReTr_Loop])))
Special Effect - Create a special effect at ReTr_z_Point[2] using ReTr_Config_SFX
Special Effect - Set Color of (Last created special effect) to r: 255, g: 255, b: 0
Special Effect - Set Scale of (Last created special effect) to ReTr_Config_Size[ReTr_z_Level[ReTr_Loop]]
Special Effect - Set Position - Z of (Last created special effect) to ((Position - Z of (Last created special effect)) + ReTr_Config_Z_height[ReTr_z_Level[ReTr_Loop]])
Special Effect - Destroy (Last created special effect)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within ReTr_Config_AOE[ReTr_z_Level[ReTr_Loop]] of ReTr_z_Point[2]) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A structure) Equal to False
((Picked unit) is Magic Immune) Equal to False
((Picked unit) is alive) Equal to True
((Picked unit) belongs to an enemy of (Owner of ReTr_z_Caster[ReTr_Loop])) Equal to True
Then - Actions
Unit - Cause ReTr_z_Caster[ReTr_Loop] to damage (Picked unit), dealing (ReTr_Config_Damage[ReTr_z_Level[ReTr_Loop]] / (ReTr_Config_T_Duration[ReTr_z_Level[ReTr_Loop]] / ReTr_Config_Tick[ReTr_z_Level[ReTr_Loop]])) damage of attack type ReTr_Config_ATK_T and damage type ReTr_Config_DAM_T
Else - Actions
Custom script: call RemoveLocation(udg_ReTr_z_Point[2])
Else - Actions
-------- --------
Thanks! i really appreciate it! i needed this for my custom map ^_^
Oh, and if the "Math - Modulo" bit is too difficult just add another variable and subtract from it much like T_Duration, and then reset it back to the Config Tick once you deal the area damage.