Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Under water damage

Author
Message
HarryWever
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 28th Mar 2011 23:56
Hello,

Is there a script, that the player can't stay under water for long.
Now it is possible to stay under water with no damage to the player.


Many thanks

Harry Wever
raymondlee306
15
Years of Service
User Offline
Joined: 24th Oct 2009
Location: Ohio
Posted: 29th Mar 2011 01:52
I don't have an immediate solution for this, but, maybe take a body armor script and use it like oxygen and reduce the body armor in player is in the water zone?
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 29th Mar 2011 02:03 Edited at: 29th Mar 2011 02:08
The short of it.

There is a condition called plrunderwater (plrunderwater=1). Used in conjunction with a timer you can time how long the player is under water. Without oxygen (re: body armor script mentioned by raymondlee306) you can reduce the player's health by so much in timed increments and if the player doesn't come up for air, eventually he/she runs out of oxygen (health) and dies.

Addendum:

There is also a condition command for entities. This command would be placed in the entity's main script. It is called underwater. You can check to see if an entity goes under water if the water level is rising. If you use underwater=1 and the entity is under water then it returns true and whatever actions you want to do will be performed.


Terry
Michael Thompson
16
Years of Service
User Offline
Joined: 15th Aug 2008
Location: Behind you (if not, in australia)
Posted: 30th Mar 2011 17:59
I was waiting 4 someone to ask a question like that. Thanks Flatlander.

http://www.flashstargamecreations.webs.com
HarryWever
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 1st Apr 2011 00:22
Oke thanks fot the answer...
I will give it a try


Harry
ccliffy
21
Years of Service
User Offline
Joined: 2nd Apr 2003
Location:
Posted: 23rd Apr 2011 03:04
Model Pack 54 has script to handle this too

Login to post a reply

Server time is: 2024-11-24 08:56:07
Your offset time is: 2024-11-24 08:56:07