Page 1 of 1

Some wishes about self destruction

Posted: 08 Sep 2006, 19:10
by KDR_11k
1. A CanSelfD tag to allow modders to disable the TA-ism that everything is self-destructable. Maybe some mods don't want their players to use scorched earth tactics without manually blowing up the units they want gone (so e.g. the enemy can't capture or reclaim them).
2. A way for a script to destroy its unit. This has many uses, the one I was thinking of was a weapons satelite that carries a limited number of missiles and once those are depleted the satelite self-destructs (including a reentry animation that has the satelite burning up in the atmosphere) as it has become useless.

Re: Some wishes about self destruction

Posted: 08 Sep 2006, 21:34
by Guessmyname
KDR_11k wrote:2. A way for a script to destroy its unit. This has many uses, the one I was thinking of was a weapons satelite that carries a limited number of missiles and once those are depleted the satelite self-destructs (including a reentry animation that has the satelite burning up in the atmosphere) as it has become useless.
Calling the Killed() function should do this, I think. A way to set Health too would be nice (there was a patch to do this but it was for an old version of Spring...)

Posted: 09 Sep 2006, 09:13
by KDR_11k
No, that doesn't work. Killed is just the function that gets called when the unit dies, it has no special meaning by itself (just like calling AimWeaponX won't fire the weapon).

Posted: 12 Sep 2006, 01:20
by MrSpontaneous
+1 to this