Page 1 of 1

Stopping Units From Dieing When Underwater

Posted: Sun Jan 14, 2007 10:07 pm
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. :)

RE: Stopping Units From Dieing When Underwater

Posted: Mon Jan 15, 2007 1:48 am
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:

RE: Stopping Units From Dieing When Underwater

Posted: Mon Jan 15, 2007 1:50 am
by PvtParts
Only downside is it works outside of water - the unit will always gain that much health at the default rate...

RE: Stopping Units From Dieing When Underwater

Posted: Mon Jan 15, 2007 2:04 am
by Rikino
Ooooor... you could use Majin's solution:
rep_inf_clone_commando wrote:WaterDamageInterval = "0.0"
WaterDamageAmount = "0.0"

RE: Stopping Units From Dieing When Underwater

Posted: Mon Jan 15, 2007 10:03 am
by Darth_Z13
Oooo! YAY! I'll try that!

RE: Stopping Units From Dieing When Underwater

Posted: Mon Jan 15, 2007 7:42 pm
by Darth_Z13
It doesn't work Rikino.

RE: Stopping Units From Dieing When Underwater

Posted: Mon Jan 15, 2007 7:54 pm
by Alpha
Majin's hypothesis never worked. If someone gets the regions thing to work, please post. :D

Re: RE: Stopping Units From Dieing When Underwater

Posted: Mon Jan 15, 2007 8:53 pm
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()... )?

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

Posted: Mon Jan 15, 2007 10:10 pm
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

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

Posted: Mon Jan 15, 2007 10:45 pm
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:

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

Posted: Tue Jan 16, 2007 5:01 am
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?

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

Posted: Tue Jan 16, 2007 9:28 am
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...

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

Posted: Tue Jan 16, 2007 9:30 am
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

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

Posted: Tue Jan 16, 2007 5:41 pm
by Darth_Z13
What cube would I use Qdin and how would I make it waterproof?

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

Posted: Tue Jan 16, 2007 7:52 pm
by Teancum
Why not just make a damage region underwater that slowly heals? That's about the closest workaround I can think of.

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

Posted: Tue Jan 16, 2007 9:02 pm
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.

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

Posted: Sat Jan 20, 2007 12:04 am
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.

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

Posted: Sat Jan 20, 2007 1:43 am
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.

Posted: Tue Feb 06, 2007 7:39 pm
by Big_rich
HealthType = "droid"

does this not work underwater?