Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: Grayzzur on October 05, 2014, 09:10:30 PM

Title: Issue with Destroy command on Strafer/Bomber
Post by: Grayzzur on October 05, 2014, 09:10:30 PM
The Destroy command doesn't seem to work the same on Strafers and Bombers as on other units. Destroy(<<unitID>> 1) gives the small soundless flash as expected, but all other Destroy options produce the full explosion with sound.

(Also, is there a way to remove an un-built unit without the "Strafer Lost!" type message popping up?)
Title: Re: Issue with Destroy command on Strafer/Bomber
Post by: knucracker on October 06, 2014, 08:36:16 AM
Looks like when the landing pad is destroyed the pad itself should obey the destroy options.  The pad in turn will then destroy the associated flying unit, and it does not pass along the destroy options (one of them it does... that's why "1" works).  So, the only way to work around this would be to manually destroy the flying unit yourself first, then destroy the pad (back to back calls from CRPL).  That might work... maybe :)

For the popup event message, it looks like the only hope there might be to use mode 1.... and to destroy the strafer manually before destroying the pad, like the above suggestion.  Again, not tested.  That's just my first assessment from looking at the code first thing in the morning on Monday :)
Title: Re: Issue with Destroy command on Strafer/Bomber
Post by: Grayzzur on October 06, 2014, 09:09:21 AM
I'll play around with it and see what comes up.

Does the flying unit exist in the game yet when the pad has not been completely built?
Title: Re: Issue with Destroy command on Strafer/Bomber
Post by: knucracker on October 06, 2014, 10:15:47 AM
I bet it doesn't... which makes things extra complicated for getting the UID of the flying unit...