the amount of time the air lasts under water

Any aspects of level design for the Source engine.

the amount of time the air lasts under water

Postby cjbeattie on Sat Feb 04, 2012 12:40 am

Hey guys,

do's anyone know how i can extend the amount of time the player in halflife 2 can spend under water?

thanks

c :smt045
cjbeattie
Member
Member
 
Joined: Sun Jun 15, 2008 5:53 pm

Re: the amount of time the air lasts under water

Postby Armageddon on Sat Feb 04, 2012 12:42 am

User avatar
Armageddon
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sun Dec 14, 2008 5:53 am

Re: the amount of time the air lasts under water

Postby cjbeattie on Sat Feb 04, 2012 2:07 am

thanks

i take it there is no easy way to extend the amount of air you have...

thanks anyways

C
cjbeattie
Member
Member
 
Joined: Sun Jun 15, 2008 5:53 pm

Re: the amount of time the air lasts under water

Postby trcc on Sat Feb 04, 2012 9:31 pm

I assume you want this feature for Gamebanana's underwater map contest?
trcc
Pheropod
Pheropod
 
Joined: Fri Aug 14, 2009 6:54 pm
Location: Montréal, Canada

Re: the amount of time the air lasts under water

Postby Gary on Sat Feb 04, 2012 11:35 pm

You use a point_server/clientcommand to "give item_battery" to restore the suit energy(thus giving more air).

If you can code:
You could easily modify the amount of time, either by modding time underwater variable or suit power use per second under water. But I have no access to code to test anything for you.
Have a question related to modding or something I posted? Something that needs staff attention? PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: the amount of time the air lasts under water

Postby cjbeattie on Tue Feb 07, 2012 5:21 am

hi garry

thanks for the help.. no not for fps banana.. just for my own map

thanks again

c
cjbeattie
Member
Member
 
Joined: Sun Jun 15, 2008 5:53 pm

Re: the amount of time the air lasts under water

Postby Gary on Tue Feb 07, 2012 10:06 am

Sorry, I was being lazy. I took three seconds of my time to figure this out. I should've done this earlier...

src\game\server\player.cpp - line 1,860

Code: Select all
#define AIRTIME   7   // lung full of air lasts this many seconds


There are also values under that one that deal with damage dealt when you start to drown.
Have a question related to modding or something I posted? Something that needs staff attention? PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: the amount of time the air lasts under water

Postby cjbeattie on Tue Feb 07, 2012 6:54 pm

ok thanks gary

c
cjbeattie
Member
Member
 
Joined: Sun Jun 15, 2008 5:53 pm

Return to Hammer Editor Help

Who is online

Users browsing this forum: No registered users