Page 1 of 2
Throw away units
Posted: 11 Sep 2006, 21:42
by MrSpontaneous
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
Posted: 11 Sep 2006, 22:10
by Drone_Fragger
Its rather important for a mod we're making :O
Posted: 11 Sep 2006, 22:36
by Snipawolf
Wasn't there a request in the forums for being able to set something similar to that? About having it able to ONLY build, or ONLY rez, or only rev.. We need that idea,,
Posted: 11 Sep 2006, 22:40
by MrSpontaneous
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.
Posted: 11 Sep 2006, 23:28
by Caydr
I think I read that Spring has a set_health script tag thingie.
If it does, you could have fireprimary contain a +1 to... eh... whatever you +1 to... and when it adds up to 10, set_health 0.
Posted: 11 Sep 2006, 23:41
by FizWizz
umm, it would obviously be hard to witness this, but I heard that units don't actually die until they go into negative health, not at zero. Please correct me if I am wrong though.
Posted: 11 Sep 2006, 23:46
by Caydr
Set AK to 100 health, set AK laser to 100 damage, see if one shot kills AK. Someone less lazy than me, figure it out.
Posted: 11 Sep 2006, 23:47
by Peet
Posted: 11 Sep 2006, 23:49
by FizWizz
and now we know

Posted: 11 Sep 2006, 23:50
by Peet
Good timing too, that happened just a couple of days ago.
Posted: 11 Sep 2006, 23:53
by MrSpontaneous
Thanks every one for the information.

Posted: 12 Sep 2006, 00:04
by KDR_11k
HEALTH is get-only, any attempts to set it are ignored.
Posted: 23 Sep 2006, 18:06
by zwzsg
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:
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:
Code: Select all
while(TRUE)
{
explode head type FALL | SMOKE | FIRE | EXPLODE_ON_HIT | BITMAP3;
show head;
sleep 200;
}
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.
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?
Posted: 23 Sep 2006, 18:56
by KDR_11k
I've looked at the SVN code, HEALTH is get only (or was when I wrote that comment). Not sure if explode still does damage though I don't think so. But now that we can spawn damaging explosions at will we won't need any explode workarounds anymore.
Posted: 23 Sep 2006, 19:20
by zwzsg
Oh right.
Hey, script-spawn explosion + weapon affecting the unit that fired it + null damage + high impulse factor = Jump Jets!
Posted: 23 Sep 2006, 20:03
by KDR_11k
Yep, I was thinking the same thing. Though falling damage still applies so it probably won't be useful for more than making crawling bombs jump at the enemy.
Posted: 23 Sep 2006, 22:45
by MrSpontaneous
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
Posted: 23 Sep 2006, 23:01
by Caydr
KDR_11k wrote:crawling bombs jump at the enemy.
Oh my shit. That would be awesome.
Posted: 23 Sep 2006, 23:29
by Guessmyname
Then get to work! *prods Cadyr repeatedly*
Posted: 23 Sep 2006, 23:41
by Caydr
Oh, by the way, I just noticed this in the change-history-deal-thing.
Code: Select all
Added suport for fireing weapon via script
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.