Hello guys,
I want DestroyAllEnemyUnits to trigger when the unit in which this script is running gets destroyed.
Currently it's not working, although GetCellOccupiedCount worked for me in other examples.
Anything I'm missing? :)
CurrentCoords GetCellOccupiedCount 1 lt if
once
DestroyAllEnemyUnits(0)
endonce
endif
Well, the short answer is that after the unit is destroyed, the script is not run.
Fortunately, there's a function for exactly this:
When a unit is destroyed, it runs any :destroyed functions in attached scripts.
You will want:
:destroyed
0 DestroyAllEnemyUnits
Thanks GoodMorning, I'm so dumb lol! :(