How to breath underwater
11 replies



22.07.10 04:46:40 am
I'm in the middle of making a scuba gear item, but how do I set it so that the player can breath underwater, can someone help me? This is very frustrating.

use the script command
air 
and/or open game.inf and change the line
dive_time=20000
(but this one is probably only an option when making a mod)


and/or open game.inf and change the line
dive_time=20000
(but this one is probably only an option when making a mod)
Well I made a script that sets the air to 20000 every time you use it, but it just sets my air to 0, anyone know why?
uhm.. I guess you did it wrong. too bad that you didn't show your script because it would make things much easier...
there's actually not much you can do wrong. you only need to execute that single command properly with a correct parameter.
for example will give you air for 10,000 milliseconds. that are 10 seconds (1,000 ms = 1 second)
there's actually not much you can do wrong. you only need to execute that single command properly with a correct parameter.
Code:
1
air 10000;
for example will give you air for 10,000 milliseconds. that are 10 seconds (1,000 ms = 1 second)
I know what I did wrong... I set it to -20000 on accident, its fixed now, also I don't think this needs a new topic, but is there a way to make the player fall slowly throgh the air, like using a parachute?
you could move the player upwards a bit while he is falling. so it looks like he is falling slower. this might lead to a quite jerky and unclean result though...

Pupp3t has written:
You cant change the player's speed with a script ingame rite?
You can add state "speed" - it makes speed faster.
Oh yeahs... :3
just make the character fall from a great height, then activate the state through an item use, or a time trigger etc.
just make the character fall from a great height, then activate the state through an item use, or a time trigger etc.



