The relativistic missiles has also a pre-1.31 version, so you could use it as well, the problem is if you preffer GUI past it to your map would be hard, so better search other system, the most important thing is it should run a trigger when the missile reaches its target and also allows you store an integer, for the code you need store 3 things: the unit source, the damage and the number of bouncing, also make it MUI, the system would look like this:
(Asumming you are using the
Damage Engine 3A.0.0.0 and 3.8.0.0)
-
Init
-

Events
-

Conditions
-

Actions
-


Set Spell = <Your spell>
-


Set CheckArea = <Your area>
-


Set MaxBounces = <The number you wanna>
-


Set DamageFactor = <Your damage factor>
-


Set DamageBanned = <Some integer except -1, 0, 1, 2, 3, 4>
-


Set Recycle[0] = 1
-
Bounce
-

Events
-


Game - DamageEvent becomes Equal to 1.00
-

Conditions
-


DamageEventType Not equal to DamageBanned
-


((Level of Spell for DamageEventSource) Greater than 0
-

Actions
-


Set TempLoc = (Position of DamageEventTarget)
-


-------- I think this is the how you wanna check the avaible units --------
-


Set TempGroup = (Units within CheckArea of TempLoc matching ((((Matching unit) belongs to an enemy of (Owner of DamageEventSource)) Equal to True) and (((Matching unit) is An structure) Equal to False)))
-


Set TempUnit = (Random unit of TempGroup)
-


Custom script: call RemoveLocation(udg_TempLoc)
-


Custom script: call DestroyGroup(udg_TempGroup)
-


-------- Create the next missile --------
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




TempUnit Not equal to No unit
-



Then - Actions
-




-------- The Dynamic Indexing is not an option, you need allocation --------
-




-------- There are systems for that, but the main idea is: --------
-




Set Index = Recycle[0]
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-





Then - Actions
-






Set Recycle[0] = Index + 1
-





Else - Actions
-






Set Recycle[0] = Recycle[Index]
-




Set Source[Index] = DamageEventSource
-




Set Damage[Index] = DamageEventAmount
-




Set Bounce[Index] = MaxBounces
-




-------- Depending on how works the missile system you picked, you should do something like this --------
-




Do the stuff
-




The target is the TempUnit
-




Store the Index integer
-




Store the next trigger as the callback when the missile reaches the target
-




Create and lauch the missile
-



Else - Actions
-
OnHit
-

Events
-

Conditions
-

Actions
-


Set Index = <The stored integer>
-


Set Damage[Index] = Damage[Index] * DamageFactor
-


Set NextDamageType = DamageBanned
-


Unit - Cause Source[Index] to damage <The target>, dealing Damage[Index] damage of attack type Normal and damage type Normal
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Bounce[Index] Greater than 0
-



Then - Actions
-




-------- Repeat the process --------
-




Set TempLoc = (Position of <The target>)
-




Set TempGroup = (Units within <Your area> of TempLoc matching (((((Matching unit) belongs to an enemy of (Owner of Source[Index])) Equal to True) and (((Matching unit) is An structure) Equal to False))) and ((Matching unit) Not equal to <The target>))
-




Set TempUnit = (Random unit of TempGroup)
-




Custom script: call RemoveLocation(udg_TempLoc)
-




Custom script: call DestroyGroup(udg_TempGroup)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






TempUnit Not equal to No unit
-





Then - Actions
-






Set Bounce[Index] = Bounce[Index] - 1
-






Repeat again the missile creation, you don't need reasing the variables, just store again the Index
-





Else - Actions
-






-------- End the process and deallocate --------
-






Set Recycle[Index] = Recycle[0]
-






Set Recycle[0] = Index
-



Else - Actions
-




-------- End the process and deallocate --------
-




Set Recycle[Index] = Recycle[0]
-




Set Recycle[0] = Index
I could forgot something, but in GUI this should be the idea (obviously you have to name the variables in your own way, I just do it like that to make short the code).