Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Submersible Script Request

Corporal Candour
Registered User
Join date: 3 Sep 2005
Posts: 38
03-19-2006 12:11
Hello, I have a question...is it possible to make a vehicle that flies like a normal aircraft but ONLY under water? I want it to work normally under water but not work above water, such as a submarine. Is there a certain trick or line I throw in a normal aircraft script to achieve this?
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
03-19-2006 13:25
Never tried, I don't like vehicle scripting that much but:

llWater() will give you the water height in the sim - pos=llGetPos() and height=poz.z will give you the height of the sub - if height<llWater... you're underwater (or under the ground potentially).
Corporal Candour
Registered User
Join date: 3 Sep 2005
Posts: 38
03-19-2006 16:24
I'm not quite the expert at scripting and am wondering if you could put that in an example vehicle script, or at least show me the lines I need to assemble this script.

Thanks,
Corporal Candour