Adding Self-Destruct to Units

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

PvtParts wrote:Well, in my games, I redid the shockfield weapon. Now, its meant to be a self destruct weapon. I used the ApplyOnOwnerIfOnOthers command to simulate a self destruct sort weapon. Basically, if there is no-one in the immediate area when you fire it you do not die, but when others are affected, it kills you as well.

Have you considered using the SoldierHealth command, and setting it to a negative number, such as -500
I did try adding a SoldierHealth line into the weapon's ord (and weapon and exp, just for good measure, :lol: ), but to no avail.

An idea I came up with, and am still tooling around with, is that of creating a health recharge station dispenser, giving the dispensed item a high gravity or large radius (probably the former), and setting its SoldierHealth line to a negative number - since the SoldierHealth should work with it. What it would ideally do is act as an invisible health de-recharge station, and in one pulse deal out about 2000 damage to a surrounding radius (or whatever I deem necessary when health values are established). That way, I could potentially have a bomb that ignores any sort of team attack restrictions and kills you automatically.

Sounds good, but I've tried it once, and with no success. I basically had a floating health station (I didn't give it a small/invisible mesh yet) that took damage like a mine. I'm going to keep working with this, as so far it seems like the most viable option, but any specifics on making this work (and thus saving me work ;)) would be greatly appreciated.
Big_rich

Post by Big_rich »

couldn't you use a debuffdamage like a poison and edit the effect instead of a green poison debuff effect have it explode like a nade? That would prob be the easiest way for a suicide bomb. Because poison is an emitterordanace, and can have a varing "effect" you can set the debuffdamage higher than Hps of most, and ApplyToYouIfOnOther..whatever the command is. Allow chaining, all kinda neat stuff.Boom, instant selfdestruct.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

Big_rich wrote:couldn't you use a debuffdamage like a poison and edit the effect instead of a green poison debuff effect have it explode like a nade? That would prob be the easiest way for a suicide bomb. Because poison is an emitterordanace, and can have a varing "effect" you can set the debuffdamage higher than Hps of most, and ApplyToYouIfOnOther..whatever the command is. Allow chaining, all kinda neat stuff.Boom, instant selfdestruct.
That was actually the first thing I tried after the remotedroid self-destruct. There are two glaring problems: One, the self-destruct has no risk (and very little logic) if it only explodes when it hits someone, and two, the ApplyToYouIfOnOther command only actually hits you if team attack is on.
Big_rich

Post by Big_rich »

Well that shoots my idea out of the water.. I'll have to go back to the drawing board... Sitcky nade with maxrange 0? Idk, just doing some brainstorming. Guess I should've read the first post. How about a timebomb with timer set at 0? Or a mine which is set to harm enemy and friend? AHh wait a landmine that has these props:
//set all exp to com_weap_inf_landmine_exp
ExplosionTrigger = "com_weap_inf_landmine_exp"
ExplosionDeath = "com_weap_inf_landmine_exp"
ExplosionExpire = "com_weap_inf_landmine_exp"
TriggerContact = "1"
TriggerRadius = "1.0"
//SuppressRadius = "1.0"

HealthType = "Mine"
//lifespan so it expires instantly
LifeSpan = "0.1"
NoLifeSpanDisplay = "1"
PvtParts
Jedi
Jedi
Posts: 1001
Joined: Mon Apr 03, 2006 9:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: plundering yer booty

Post by PvtParts »

Theres a million ways to do this, the question is, how much time are you willing to spend on it?

An untextured orbitle strike, with a variance of 0 and an ordinance lifetime of .1. Make the bolt invisible (not untextured wtf), add an appropriate damage radius, and make whichever explosion effect you want for your self destruct be that of the bolt exp.

Moreover, I dont know why the ff thing is such a big deal. I mean, think about it. If this is a weapon, people will want to be able to use it just like any other weapon. That means, if they have ff off, they will want ff off. If they want it to hurt their teamates just like there other weapons, then they will have no issues with enabling ff.

Basically, my point is, your overworking yourself. Making it unaffected by friendly fire, from what I understand (obviously if theres more to this than it just being an infantry weapon...) than the ff issue is unimportant, and will not even remotly be frowned uponed if/when this appears in a map, or mod.
t551
General
General
Posts: 791
Joined: Sat Jul 16, 2005 3:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by t551 »

Well, orbital strike will be useless indoors or in a forest...
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

PvtParts wrote:Theres a million ways to do this, the question is, how much time are you willing to spend on it?

An untextured orbitle strike, with a variance of 0 and an ordinance lifetime of .1. Make the bolt invisible (not untextured wtf), add an appropriate damage radius, and make whichever explosion effect you want for your self destruct be that of the bolt exp.

Moreover, I dont know why the ff thing is such a big deal. I mean, think about it. If this is a weapon, people will want to be able to use it just like any other weapon. That means, if they have ff off, they will want ff off. If they want it to hurt their teamates just like there other weapons, then they will have no issues with enabling ff.

Basically, my point is, your overworking yourself. Making it unaffected by friendly fire, from what I understand (obviously if theres more to this than it just being an infantry weapon...) than the ff issue is unimportant, and will not even remotly be frowned uponed if/when this appears in a map, or mod.
The point is not so much that I'm hung up on it doing damage to your teammates, but rather that I want it to do damage to yourself - it is a self-destruct, after all. With team attack off, you can't damage yourself with a weapon, and it would be a little bit silly to have a powerful "self-destruct" that one could use without consequence (this is to be a weapon for a droid hero, and since it's not only a hero weapon, but one that kills that hero, it will be more powerful than any infantry weapon).

Otherwise, yes, I would just use a shockfield, like you suggested earlier.
t551
General
General
Posts: 791
Joined: Sat Jul 16, 2005 3:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by t551 »

You can hurt yourself with team damage off, what about if you drop your grenade at your feet? That will still kill you, won't it?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

t551t551 wrote:You can hurt yourself with team damage off, what about if you drop your grenade at your feet? That will still kill you, won't it?
You've obviously never played online. ;) The "roll-through-your-own-grenade" technique is one of the most effective there are.
t551
General
General
Posts: 791
Joined: Sat Jul 16, 2005 3:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by t551 »

AH, yes I don't really play online. I think, though, in BF1, you could never really turn FF of, you could always kill ai, and yourself. Maybe that's what I remember.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

Well, many days and attempts later, I can say with a fair amount of authority that there's a pretty high chance that a self-destruct for a unit (as described in previous posts) cannot be implemented. The best I can do is make an overload weapon out of the shockfield (as suggested by PvtParts - thanks to him, by the way, he'll be credited for that in the mod) and use a similar rationale. Thanks to everyone who's tried to come up with ideas, if some flash of insight hits you, let me know via PM.
PvtParts
Jedi
Jedi
Posts: 1001
Joined: Mon Apr 03, 2006 9:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: plundering yer booty

Post by PvtParts »

Sure thing man - and expect to here from me, as I will definatly be looking into this, for my interests as well as yours.
Post Reply