I needed a robust water system for my mod and couldn't find quite what I was looking for so I tackled the problem myself.
This is a pretty customizable underwater system that does several different things with only 1 major include script, 1 small piece of code to use or add to your areas "OnHeartbeat" script and 1 line added to your water areas "OnExit" script.
-If a creature in the area is not wearing a protective water breathing item, does not possess some other named item, is not a qualifying sub-race, or is not considered immune to water effects, they will take drowning damage per area heartbeat.
-Creatures not considered immune will also receive some permanent effects including an attack penalty, a movement speed decrease, and the "bubbles" visual effect.
-Creatures with a Water Elemental appearance and the elemental racial type are immune to the effects.
-Undead and constructs do not take drowning damage but do receive the other mentioned effects.
-You can make any creature immune by adding a variable as well.
-All creatures entering the area also have their footstep sounds set to the shark type. They are restored to default upon exiting the area.
-Many of what is mentioned above is changeable in the include script and is pretty straight forward with all the included commenting.
As this is used in an areas "OnHeartbeat" event, I made sure to keep the code as efficient as possible. There will be a noticeable delay when adding the effects when transitioning from one water area to another due to the six second delay of area heartbeats. This is not from lag and is intentional to keep scripts to a minimum.
Posted by curtwise at 2011-06-02 20:26:27 Voted 10.00 on 06/02/11
Was easy to install and works like stated. Somewhat customizable. Good job! _________________________ You may think you know, and you might, but your ignorance hides it.
People spend their whole life trying to be what they are not, only to end up being what they are.
Posted by gra_ulv at 2010-08-09 13:15:14 Voted 10.00 on 08/09/10
Easy to install and configure. I added the phenotype change of flying so it looks like swimming. Other than that it was exactly what I wanted. _________________________ Dolentoll - The Hidden Islands Link
Posted by JackTaylor at 2010-07-06 09:02:20 Voted 10.00 on 07/06/10
Excellent work! Thanks for sharing.
JFK _________________________ My other sword is a +5 Holy Avenger
JFK Swimming Skinmesh Fish Link
JFK Makeshift Weapons Link
Posted by jdeavila at 2010-03-27 10:56:24 Voted 10.00 on 03/27/10
nice work _________________________ Imtherealthing
@ jjsparks. Might want to double check that all of your water areas have the line required for the "OnExit" event of that area. If you still have one of the effects then the other will still be there as well. Hope that helps ya. Good Luck.
Posted by jjsparks at 2010-03-06 21:52:38 Voted 10.00 on 03/06/10
Very nice script. Easy to use and easy to customize. I found that I had to add a trigger to turn off the footsteps around my portals targets however because players would port out and the effect would stay with them. It was funny hearing people walk through town as though they had water logged boots though. Cheers and thanks again!
Nice work on this. Easy to install and customize. Sample code for water breathing variable is handy for many to start out with.
I especially like the footstep sound alteration, something I'm going to have to add to my own underwater effects. Thanks for uploading this. _________________________ World of Aenea (Hall of Fame PW and the origin of all my works)
Vault Entries: The Complete List (50+ entries, including 17 Hall of Fame awards)
Self-Promotional Honesty: If you have opinions on stuff I've made, or if you use any of it (as a player or builder), I like comments/votes/feedback...so do other content makers and builders. Keep us motivated. :)