Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

stay under water (swimming + flying)

Erluen Twin
Registered User
Join date: 26 May 2006
Posts: 23
10-09-2006 07:05
Im looking for a script which will allow my avatar to stay in the water while flying.
I have my own swimming animations, but using walk makes me scrape along the ground, and using fly makes me swim 6 feet above the water level.

How do I keep my avatar just below the water surface?
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-09-2006 08:23
You might like to check your current attachments for a flight-boost of some kind that keeps you over water level as well as over land level. It is possible (at least if the water is more than a couple of metres deep or so) to swim underwater by flying.

If you can't find one, I'd suggest finding a flight-boost of some kind and hacking the code to let you fly underwater but over ground (llWater, llGround are the relevant functions) although it's going to be a fiddle I suspect to get the heights right etc.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
10-09-2006 11:16
It might be worth trying 'llSetHoverHeight()' with a negative value for the height and the TRUE for the 'water' parameter (http://www.lslwiki.com/lslwiki/wakka.php?wakka=llSetHoverHeight). Another option would be to use a vehicle; vehicles don't seem to have an innate hover height like flight does (and even if they did you could use a global hover height or something).
Kage Seraph
I Dig Giant Mecha
Join date: 3 Nov 2004
Posts: 513
10-09-2006 13:28
Alternately you could have a slow timer that checks your altitude relative to llWater. If you're outside some specified tolerance, say, 0.2m, have the script llPushObject you back toward the desired altitude with a strength scaled by your offset from llWater. Clunky, but it would work quite fine with a reasonable timer interval.
_____________________
Stephanie Abernathy
Susan Ivanova Wannabe
Join date: 8 May 2006
Posts: 352
10-09-2006 14:14
You might want to do a search on Siggy Romulus, and go to his island (Waterworks, i think it's called) and look at his scripted water & his Swimmer 1.1 Hud.
Erluen Twin
Registered User
Join date: 26 May 2006
Posts: 23
10-11-2006 21:23
Thanks all! Ill try all of these options and post the best one bac on the wiki or here!
Erluen Twin
Registered User
Join date: 26 May 2006
Posts: 23
10-14-2006 03:30
Well it seems I need to know stuff about getPermissions.. which I dont. Otherwise the set hover height only affects the object when its not attached

And unfortunatly Siggys swimmer is no mod. As much as Id like to peek inside.
The flight booster I have is so complicated, and doesnt have llWater at all.

If I used a vehicle script in a prim, then attatched that prim to my avatar, would my avatar still be able to use my AO and the usual swimming animations I have in the AO?

Or would I have to make a HUD and include all the animations in it?
(which would be painful to me since I know nothing about get permissions or making HUDS) Isnt there a simple way?
Kage Seraph
I Dig Giant Mecha
Join date: 3 Nov 2004
Posts: 513
10-16-2006 17:35
From: Erluen Twin
If I used a vehicle script in a prim, then attatched that prim to my avatar, would my avatar still be able to use my AO and the usual swimming animations I have in the AO?

Or would I have to make a HUD and include all the animations in it?
(which would be painful to me since I know nothing about get permissions or making HUDS) Isnt there a simple way?


If you attach a vehicle, it can't become physical and be all smooth and sezzy. But your anims would work just fine, most likely (unless the vehicle is scripted to trigger an anim, many are).
_____________________