@DexterFstone The more important issue is that your spell is not MUI, which means multiple units cannot cast the spell at the same time. In fact, the same unit may not be able to spam the spell without glitches. If your spell has a duration, a unit can bug the spell out if it casts the spell again before the duration of the previous spell cast is over. Try your hand at remaking the spell with either
dynamic indexing or
linked list. Or follow your own path. However, you might not be able to make heads or tails on which direction to go if you choose to do so. Besides, there are many more options to choose from to achieve MUI:
- MUI Triggers with Waits
- GUI Spell System
- Unit Indexer
- Spell Framework
- Allocator Engine
- MUI Engine
- Mui
- Shadowing Globals (not really an option in your case)
- GBS
- and many more...
Of course, all of these options require you to make some effort in learning how to utilize them.
P.S. I hope I do not get banned for making too many edits in such quick sessions.