A Quick Question On Stealth

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

Slime615
Lieutenant General
Lieutenant General
Posts: 704
Joined: Thu Jan 07, 2010 9:38 am

A Quick Question On Stealth

Post by Slime615 »

Ok, quick question?

How do I add a stealth weapon, that is always on, unless a person fires their weapon, then automaticly comes back on after a the weapon has stopped firing?

I need it for my special opps Mod
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: A Quick Question On Stealth

Post by Teancum »

The Bothan Spy has pretty much exactly what you want. I'd look at his odfs.
Slime615
Lieutenant General
Lieutenant General
Posts: 704
Joined: Thu Jan 07, 2010 9:38 am

Re: A Quick Question On Stealth

Post by Slime615 »

Ah yes. Exept, i want the unit to always be in stealth, not have a weapon that puts them in it, but to have it as a feature of their armour so to speak.

It is not togable, but automatic, not a weapon.

:(

Any help?
User avatar
Snork
Lieutenant General
Lieutenant General
Posts: 669
Joined: Thu Jun 07, 2007 3:34 pm
Games I'm Playing :: SWBF2 and Minecraft
xbox live or psn: No gamertag set
Contact:

Re: A Quick Question On Stealth

Post by Snork »

I think just giving the texture an alpha channel and hex editting transparency would do it
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: A Quick Question On Stealth

Post by Fiodis »

Then it'd always be transparent. I think he wants it so that the unit has stealth on when it spawns, and always has stealth on unless they're in the process of firing a specific weapon. More basically, I think he wants to have the Bothan's stealth auto-fire. I don't think that's possible.
[Padawan]Helkaan
Sith
Sith
Posts: 1444
Joined: Mon Aug 16, 2010 3:01 pm
Projects :: Dunno. Maybe making something
Games I'm Playing :: Some.

Re: A Quick Question On Stealth

Post by [Padawan]Helkaan »

Snork wrote:I think just giving the texture an alpha channel and hex editting transparency would do it
I never tested that ingame, but I think this will make the player totally invisible and not transparent. That's what we do when we want to remove a jetpack from a jettrooper for example.

edit: Fiodis beat me
User avatar
sim-al2
2nd Lieutenant
2nd Lieutenant
Posts: 412
Joined: Mon Jul 06, 2009 10:26 pm
Projects :: Mapping on occasion
Games I'm Playing :: SWBFII + MW4 + SC4
Location: In the cockpit of some vehicle...

Re: A Quick Question On Stealth

Post by sim-al2 »

Snork wrote:I think just giving the texture an alpha channel and hex editting transparency would do it
But he still wouldn't have "stealth" in the viewpoint of the AI. Remember that the AI isn't really effected by visual things, i.e. the fog could be set to 1m and they could still head-shot you across the map unless you change their view settings. You need to have the stealth weapon to make the unit actually work.
User avatar
Snork
Lieutenant General
Lieutenant General
Posts: 669
Joined: Thu Jun 07, 2007 3:34 pm
Games I'm Playing :: SWBF2 and Minecraft
xbox live or psn: No gamertag set
Contact:

Re: A Quick Question On Stealth

Post by Snork »

darn :/
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: A Quick Question On Stealth

Post by Dakota »

i am just wondering something, doesn't the ai usally just turn on their stealth anyway near the time they spawn? In the my test map my stealth jet trooper ai always turn on their stealth and then run around, at that point i am just wondering where did those emp blasts come from... thats also the point when i just use the weapon that kills any unit on screen (invisable or not).

errr... my point is that i think the ai have something in their programing that makes them keep their stealth on as much as they can, just make the stealth weapon take no energy and they will usally keep it on as long as they can.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: A Quick Question On Stealth

Post by DarthD.U.C.K. »

Fiodis wrote:More basically, I think he wants to have the Bothan's stealth auto-fire. I don't think that's possible.
i think it is, years ago somebody made a laseraim as secondary weapon that shot all the time.
Slime615
Lieutenant General
Lieutenant General
Posts: 704
Joined: Thu Jan 07, 2010 9:38 am

Re: A Quick Question On Stealth

Post by Slime615 »

Is there not a way to just apply the effect to the units ODF, using a similar script to haveing the "War Hero" Bonus on legendery? The unit always has rage active on it... I simply want to have the stealth always active on the unit..... the same stealth as the one that the bothan use, that is true, but as a feature of the ODF, not as a weapon....


Since it would be applying the bothan ODF, it would have the same effect as the stalth has (ie not letting enemys see/shoot you)

I was sure you could just add it.... :(
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: A Quick Question On Stealth

Post by Fiodis »

DarthD.U.C.K. wrote:
Fiodis wrote:More basically, I think he wants to have the Bothan's stealth auto-fire. I don't think that's possible.
i think it is, years ago somebody made a laseraim as secondary weapon that shot all the time.
I did make a laser-aim that shot for quite a while - I suppose by bumping up the duration you could theoretically make it shoot for the entire map session. But then you wouldn't be able to turn it off by firing another weapon. Also, to make it shoot in the first place you would have had to fire it, as opposed to the laser firing itself right after you spawn.
Slime615 wrote:Is there not a way to just apply the effect to the units ODF, using a similar script to haveing the "War Hero" Bonus on legendery? The unit always has rage active on it... I simply want to have the stealth always active on the unit..... the same stealth as the one that the bothan use, that is true, but as a feature of the ODF, not as a weapon....


Since it would be applying the bothan ODF, it would have the same effect as the stalth has (ie not letting enemys see/shoot you)

I was sure you could just add it.... :(
Unfortunately it doesn't work like that. You can add a shield to a unit, and maybe a couple of other things, but you can't just take a weapon and put it into a unit. And with this, you wouldn't be "applying the bothan ODF", you'd be taking lines from a weapon odf and putting them in a unit odf. The Bothan odf itself doesn't have anything to do with stealth.
Slime615
Lieutenant General
Lieutenant General
Posts: 704
Joined: Thu Jan 07, 2010 9:38 am

Re: A Quick Question On Stealth

Post by Slime615 »

Right ok.

So,

I am trying to make a game mode called "Spec Opps"

It is essencialy, a small hunt, except, that every unit starts stealthed. They only come out of stealth when they fire a weapon, or throw a grenade or swing a sword, and enter again a short time after they stop that action.

The idea is so have a hunt "Hide and Seek"...

Is this not possible?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: A Quick Question On Stealth

Post by Fiodis »

You're supposed to locate your enemy when they fire at something, and then you briefly come out of stealth to attack them? But then they would have had to have found someone to shoot at in the first place, by seeing their target shoot at something, and that something having shot at something else....

What I'm trying to say is, why would anyone ever shoot at all? They would just give their position away.

I don't think the AI would understand this. I'm having a little trouble, myself. :wink:
Hidden/Spoiler:
Also, "Spec Ops" is short for "Special Operations". "Ops" has only one p in it.
Slime615
Lieutenant General
Lieutenant General
Posts: 704
Joined: Thu Jan 07, 2010 9:38 am

Re: A Quick Question On Stealth

Post by Slime615 »

hang on.... yeah. I see that flaw.................

Fail..........

Ok. I got it.

Because the stealth fields are not perfect. They flicker occasionaly, especialy when moving....
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: A Quick Question On Stealth

Post by DarthD.U.C.K. »

thats not the reason, you can disable the flickering
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: A Quick Question On Stealth

Post by THEWULFMAN »

DarthD.U.C.K. wrote:thats not the reason, you can disable the flickering
I think he wants to have the flickering so that the AI will fire when they see someone moving.
Slime615
Lieutenant General
Lieutenant General
Posts: 704
Joined: Thu Jan 07, 2010 9:38 am

Re: A Quick Question On Stealth

Post by Slime615 »

:D

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

Re: A Quick Question On Stealth

Post by Maveritchell »

Short answer to a long thread: It's not possible to do what you want to do exactly like you want to do it.
User avatar
Lagomorphia
Major
Major
Posts: 502
Joined: Sun Dec 13, 2009 10:02 am

Re: A Quick Question On Stealth

Post by Lagomorphia »

What's wrong with giving it no energy depletion and telling the AI to always use it?
Post Reply