Your Tower Cast trigger isn't acceptable, if a user wants to use way more towers, he will have to touch that trigger despite not being the configurable trigger. Use a loop to figure out which tower type entered the game/finished upgrade, and only then you create a new instance (the Tower_Index = Tower_Index + 1 part). Dummy flying height value should be an array variable configured in Tower INI trigger, where the indexes correspond to the tower type. Tower_Mui variable isn't needed at all, use Tower_Index for it instead. Tower_Dummy_FlyingHeight doesn't need to be an array.
In Tower Loop, once again, remove those "or multiple" conditions and check the unit type with a loop, so essentially you'd have 2 loops. You can use
-
Custom script: exitwhen true
to exit the loop early (do it on the outmost loop, not the inner one! Also use another integer variable such as Tower_Loop2).
Same thing for the Tower Death trigger. In addition, the deindexing is failing, the unit with the max index won't be looped over. See
Visualize: Dynamic Indexing to understand what I'm talking about.
It would be better if you had a prefix such as UTS_Mui than Tower_Mui (Unit Tower System - can be another name), it's a quite common word and possible to clash with other eventual spells/system the user has. I don't see the usefulness of having a debug part. Seems like only a creator of the system would need.
This system could be expanded further one day, such as removing these "finished upgrade/unit enters the map" and have a trigger to register the units the user want to attach to the tower by having variables acting as parameters. Then users could have units go "inside" towers, and able to go out.
Right now it has some issues, and is somewhat simple.
PS: In the example the warlock tower has rock spires model.