Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: DanTheGoodMan on January 06, 2014, 09:49:34 PM

Title: Opposite of FailMission?
Post by: DanTheGoodMan on January 06, 2014, 09:49:34 PM
I see that there is a FailMission command. Is there a PassMission, which would automatically complete a level?
Title: Re: Opposite of FailMission?
Post by: kwinse on January 06, 2014, 10:00:15 PM
Not directly, but there is DestroyAllEnemyUnits.
Title: Re: Opposite of FailMission?
Post by: Clean0nion on January 07, 2014, 03:01:46 AM
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.
Title: Re: Opposite of FailMission?
Post by: knucracker on January 07, 2014, 09:53:32 AM
Destruction of creeper isn't required for mission completion (on any map).
Title: Re: Opposite of FailMission?
Post by: Lost in Nowhere on January 07, 2014, 10:15:04 AM
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.
Title: Re: Opposite of FailMission?
Post by: Clean0nion on January 07, 2014, 11:14:01 AM
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.
Title: Re: Opposite of FailMission?
Post by: knucracker on January 07, 2014, 01:28:29 PM
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...
Title: Re: Opposite of FailMission?
Post by: Clean0nion on January 07, 2014, 01:29:46 PM
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.
Title: Re: Opposite of FailMission?
Post by: stewbasic on January 14, 2014, 10:31:07 AM
One other caveat I ran into: DestroyAllEnemyUnits won't finish the map if there are uncollected tech upgrades.
Title: Re: Opposite of FailMission?
Post by: planetfall on February 15, 2014, 10:50:04 PM
It's not working for me either... not even when I loop through all units and kill them manually.