I see that there is a FailMission command. Is there a PassMission, which would automatically complete a level?
Not directly, but there is DestroyAllEnemyUnits.
Quote from: kwinse on January 06, 2014, 10:00:15 PM
Not directly, but there is DestroyAllEnemyUnits.
...which won't complete the level. It just destroys the units and leaves you with the rest of the creeper.
Destruction of creeper isn't required for mission completion (on any map).
Unless, on a tower that is otherwise indestructible, you add a CRPL script that will only destroy it when there is no creeper left, and make that tower count for victory.
Quote from: virgilw on January 07, 2014, 09:53:32 AM
Destruction of creeper isn't required for mission completion (on any map).
I know. I shouldn't have added that last bit, as it was just extra detail.
What I mean is, it won't complete the map. Sure, all the power zones pop up and everything dies, but that's it. No score, no final time, no win.
Maps (by default) complete when all enemy units are destroyed. Destroying all enemy units by script will complete a map. If you have a tower that is marked so that it must be destroyed to win a map, that tower must also be destroyed. If the tower is marked so that it can't be nullified, destruction by script requires specific destruction. Those are the only rules...
Quote from: virgilw on January 07, 2014, 01:28:29 PM
If the tower is marked so that it can't be nullified, destruction by script requires specific destruction.
Oh, that's interesting and was probably my problem.
One other caveat I ran into: DestroyAllEnemyUnits won't finish the map if there are uncollected tech upgrades.
It's not working for me either... not even when I loop through all units and kill them manually.