Throw away units
Moderator: Moderators
- MrSpontaneous
- Posts: 242
- Joined: 09 Sep 2005, 22:39
Throw away units
I have a question regarding the ability to make units self destruct. Is there any way to make a unit destroy its self with out Shooting its self with a slaved weapon?
If so, what events can it be linked to?
Can units be made unable to heal (be repaired by other units)?
Thanks
If so, what events can it be linked to?
Can units be made unable to heal (be repaired by other units)?
Thanks
- Drone_Fragger
- Posts: 1341
- Joined: 04 Dec 2005, 15:49
- MrSpontaneous
- Posts: 242
- Joined: 09 Sep 2005, 22:39
You are thinking of something else (Caydr's requests, I don't recall this being one of them)
What we want to do is, say you build a unit, but it has a script function so that after maybe a minute, or perhaps after it fires 10 shots, it self destructs. So the unit can be more potent than normal because it has a short life span (shorter than other units).
It might be possible to cheat around this a bit if a unit can be made unable to be healed by other units. So that once its taken 10 damage, it will never get above that 10 damage. That way it slowly deteriorates as time goes on.
What we want to do is, say you build a unit, but it has a script function so that after maybe a minute, or perhaps after it fires 10 shots, it self destructs. So the unit can be more potent than normal because it has a short life span (shorter than other units).
It might be possible to cheat around this a bit if a unit can be made unable to be healed by other units. So that once its taken 10 damage, it will never get above that 10 damage. That way it slowly deteriorates as time goes on.
Darn, I should have saved that post where I explained how I made SWTA droid self destruct by using loads and loads of "explode" commands. Oh nevermind, the forum search worked nicely:
And Dragon45 posted ages ago a three line source code modification to make "set HEALTH to x" working, are you saying this tiny little change hasn't yet been included in a main official release?
zwzsg wrote:Actually, in Spring, the "explode" command does a little damage. Unlike TA were it was purely graphical. So, by doing a loop that keep doing "explode" on a piece near the unit center, I managed to get units self destruct in a shower of flame. The script bit looks like:
I haven't tested if it still work in latest Spring. I had lowered the apparent unit health via a large "damagemodifier" and a "set ARMORED to 1;", but it still took several seconds during which the unit showered with burning flames everything around before it eventually died.Code: Select all
while(TRUE) { explode head type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3; show head; sleep 200; }
I lobbied to get that into SWS to simulate droid deactivation when the droid command center is gone, but without success. I mean, I successfully coded it, but was unsuccesful in getting them accept it.
And Dragon45 posted ages ago a three line source code modification to make "set HEALTH to x" working, are you saying this tiny little change hasn't yet been included in a main official release?
- MrSpontaneous
- Posts: 242
- Joined: 09 Sep 2005, 22:39
heh, a unit in the mod will likly be doing some unintentionaly jumping from such an explosion
. So it looks like alot of good things are/have shown up so that disposable units can become a reality :D. the possiblilities. . .
Thanks for the additional information
edit: yay I am inspired again :D


Thanks for the additional information
edit: yay I am inspired again :D
Last edited by MrSpontaneous on 24 Sep 2006, 00:04, edited 2 times in total.
Oh, by the way, I just noticed this in the change-history-deal-thing.
So, it's now possible to have units that effectively self-d after firing their first shot, or after a certain number of shots, etc. Mr Z is going to have some explosive dysentry when he sees this.
Code: Select all
Added suport for fireing weapon via script