Stopping Units From Dieing When Underwater

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

Post Reply
Darth_Z13
Jedi High Council
Jedi High Council
Posts: 2275
Joined: Sat Jun 17, 2006 9:51 am
xbox live or psn: Xanthius Wylon
Location: Canada

Stopping Units From Dieing When Underwater

Post by Darth_Z13 »

To develop my latest map I needed a solution to this problem. I have found one. It does not get rid of the drowning effect, it merely negates it. By placing this line:

Code: Select all

AddHealth           = 30.0
into a units ODF it will recharge the unit enough to have the life at full by the time the next decrease in health rolls around. Trust me. It works. :wink:

I know that the AddHealth thing isn't a new concept but this will work until someone figures it out. :)
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

RE: Stopping Units From Dieing When Underwater

Post by [RDH]Zerted »

Any unit using this gains health at this rate whenever it is damaged.

You could place a region covering the water. Whenever someone enters the region (and thus the water) you could give them this health regen. Then when the unit leaves the water (and region) you could take it away. However, doing this would remove the effects of the Bothan's health regen if the unit had it when entering the water/region.

Edit: beat you PvtParts :wink:
Last edited by [RDH]Zerted on Mon Jan 15, 2007 1:52 am, edited 1 time in total.
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

RE: Stopping Units From Dieing When Underwater

Post by PvtParts »

Only downside is it works outside of water - the unit will always gain that much health at the default rate...
Rikino

RE: Stopping Units From Dieing When Underwater

Post by Rikino »

Ooooor... you could use Majin's solution:
rep_inf_clone_commando wrote:WaterDamageInterval = "0.0"
WaterDamageAmount = "0.0"
Darth_Z13
Jedi High Council
Jedi High Council
Posts: 2275
Joined: Sat Jun 17, 2006 9:51 am
xbox live or psn: Xanthius Wylon
Location: Canada

RE: Stopping Units From Dieing When Underwater

Post by Darth_Z13 »

Oooo! YAY! I'll try that!
Darth_Z13
Jedi High Council
Jedi High Council
Posts: 2275
Joined: Sat Jun 17, 2006 9:51 am
xbox live or psn: Xanthius Wylon
Location: Canada

RE: Stopping Units From Dieing When Underwater

Post by Darth_Z13 »

It doesn't work Rikino.
Alpha

RE: Stopping Units From Dieing When Underwater

Post by Alpha »

Majin's hypothesis never worked. If someone gets the regions thing to work, please post. :D
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: RE: Stopping Units From Dieing When Underwater

Post by [RDH]Zerted »

Alpha wrote:...If someone gets the regions thing to work, please post. :D
Its part map regions and Lua code. It can't really be fully posted. Did you want the event handler code ( OnEnterRegion()... )?
darthtrogsasea

RE: Re: RE: Stopping Units From Dieing When Underwater

Post by darthtrogsasea »

i found a way that this may work with out all that confuseing stuff just open up the droideka and search for "water"

and you should find a line that says some thing like thiss

uprigthwaterdamagehight = "1.5"

this may be a possible work around
Darth_Z13
Jedi High Council
Jedi High Council
Posts: 2275
Joined: Sat Jun 17, 2006 9:51 am
xbox live or psn: Xanthius Wylon
Location: Canada

RE: Re: RE: Stopping Units From Dieing When Underwater

Post by Darth_Z13 »

Munging right now... hopefully it works! :D

EDIT: Awww the only thing it did was make my guy sound like a droideka when walking around. :lol:
Qdin
Old School Staff
Posts: 2059
Joined: Wed Feb 23, 2005 9:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Re: RE: Stopping Units From Dieing When Underwater

Post by Qdin »

O.o

okay... as long as he didn't fold down and rolled away... :P

Isn't the damaged made under-water specified somewhere?
Alpha

RE: Re: RE: Stopping Units From Dieing When Underwater

Post by Alpha »

There is something that specifies the amount of damage taken under water somewhere, but changing the value did nothing last time I checked...
Qdin
Old School Staff
Posts: 2059
Joined: Wed Feb 23, 2005 9:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Re: RE: Stopping Units From Dieing When Underwater

Post by Qdin »

really?

What about making a huuuuuuge cube-thing and removing the collision? Maybe adding some density inside it - probably 'just' some flags and such here and there :wink: At least for underwater maps? :P
Darth_Z13
Jedi High Council
Jedi High Council
Posts: 2275
Joined: Sat Jun 17, 2006 9:51 am
xbox live or psn: Xanthius Wylon
Location: Canada

RE: Re: RE: Stopping Units From Dieing When Underwater

Post by Darth_Z13 »

What cube would I use Qdin and how would I make it waterproof?
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: Re: RE: Stopping Units From Dieing When Underwater

Post by Teancum »

Why not just make a damage region underwater that slowly heals? That's about the closest workaround I can think of.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: RE: Re: RE: ahh all the Res

Post by [RDH]Zerted »

Teancum wrote:Why not just make a damage region underwater that slowly heals?...
Which would effect units exactly as the way I pointed out, but is way easier to setup.
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

RE: Re: RE: Re: RE: ahh all the Res

Post by PvtParts »

The issue is, it would neither work nor be appropriate.

If it healed slowly, the rate at which you lose health would quickly overpower it and you'd drown just the same. Also, you could merely step into the water, thus entering the region, and gain health while not losing any from 'drowning'.

To be honest I have a feeling its just coded into the game, and theirs no getting around it as far as I know.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

RE: Re: RE: Re: RE: ahh all the Res

Post by [RDH]Zerted »

You don't put the region at the water level. Put it along the bottom where units walk. A unit doesn't have to be fully inside, just some part has to be inside the region.
Big_rich

Post by Big_rich »

HealthType = "droid"

does this not work underwater?
Post Reply