Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: Keeper Decagon on October 18, 2013, 05:01:29 PM

Title: Destroying all enemy units script
Post by: Keeper Decagon on October 18, 2013, 05:01:29 PM
Hello all,

Does anyone by any chance know the script for when you destroy a particular unit, every other enemy structure blows up, like for the Inhibitors?
I'm a bit lost when it comes to developing my own scripts. :P

Thanks
Title: Re: Destroying all enemy units script
Post by: Grauniad on October 18, 2013, 09:30:56 PM
There is a Arc Eternal map that has a unit in the middle of void. You have to blow that up to destroy all units, I believe. You could save that map and open the save in the editor. The script attached to that unit should show you how to do it.
Title: Re: Destroying all enemy units script
Post by: J on October 19, 2013, 04:58:14 AM
Quote from: Grauniad on October 18, 2013, 09:30:56 PM
There is a Arc Eternal map that has a unit in the middle of void. You have to blow that up to destroy all units, I believe. You could save that map and open the save in the editor. The script attached to that unit should show you how to do it.
You mean Krig? That doesn't blow up all enemy units once you kill it. If you look at CW1 Tucana in my alpha sector, there's a script that blows up all enemy units once all totems are activated. Remove the totem stuff and put it in a :Destroyed function and it should work. Script can be found here: http://knucklecracker.com/wiki/doku.php?id=crpl:crpltutorial:code_examples#connect_totems_to_win
Title: Re: Destroying all enemy units script
Post by: Keeper Decagon on October 19, 2013, 11:21:25 AM
Quote from: J on October 19, 2013, 04:58:14 AMIf you look at CW1 Tucana in my alpha sector, there's a script that blows up all enemy units once all totems are activated. Remove the totem stuff and put it in a :Destroyed function and it should work. Script can be found here: http://knucklecracker.com/wiki/doku.php?id=crpl:crpltutorial:code_examples#connect_totems_to_win

Ah, I see. Thanks. ;D