Throw away units

Throw away units

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Throw away units

Post 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
User avatar
Drone_Fragger
Posts: 1341
Joined: 04 Dec 2005, 15:49

Post by Drone_Fragger »

Its rather important for a mod we're making :O
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post 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,,
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post 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.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post 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.
User avatar
FizWizz
Posts: 1998
Joined: 17 Aug 2005, 11:42

Post 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.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post 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.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Image
User avatar
FizWizz
Posts: 1998
Joined: 17 Aug 2005, 11:42

Post by FizWizz »

and now we know :-)
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Good timing too, that happened just a couple of days ago.
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

Thanks every one for the information. :-)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

HEALTH is get-only, any attempts to set it are ignored.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post 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?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Oh right.

Hey, script-spawn explosion + weapon affecting the unit that fired it + null damage + high impulse factor = Jump Jets!
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post 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. . . :mrgreen:

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.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

KDR_11k wrote:crawling bombs jump at the enemy.
Oh my shit. That would be awesome.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Then get to work! *prods Cadyr repeatedly*
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post 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.
Post Reply

Return to “Game Development”