|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-13-2009 17:25
I have an object that I want to float to the surface and stop there. How do I detect water depth where the object is rezzed so that I know how much "z" to add to it's current position so that I can set it to rise to the surface and stop there? I thought that sea level would be zero but it isn't.
I tried looking in llGetParcelDetails and llGetParcelFlags but I didn't see anything in there that would help. I may have missed it.
|
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
06-13-2009 17:26
_____________________
Sick of sims locking up every time somebody TPs in? Vote for SVC-3895!!! - Go here: https://jira.secondlife.com/browse/SVC-3895- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-13-2009 17:58
Ok...I am feeling stupid. I need to improve my wiki search skills. Thank you for the help. Slapping forehead with palm of hand
|
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
06-13-2009 18:07
No worries. Everybody's new sometime. 
_____________________
Sick of sims locking up every time somebody TPs in? Vote for SVC-3895!!! - Go here: https://jira.secondlife.com/browse/SVC-3895- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-13-2009 20:35
it's also pretty safe to assume 40m =X
EDIT: 20 not 40 the reason is simple: for most sims water level is left at default so that surrounding void sims have matching water heights... there's about a dozen or so sims that use a non default, most of which are either mesa sims, or are completely lanlocked with all surrounding sims having land at the border that is above the default
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-14-2009 14:05
Any suggestions on how to combine a working llWater script with a working llMoveToTarget script? Alone they work fine making them play nice with each other not is another example of my lack of scripting skills. I can't even find an example to work with.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-14-2009 23:29
vPosNow = llGetPos(); if (llWater( vPosNow ) - vPosNow.z > 0){ //-- move up }
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-15-2009 07:54
I am not seeing how that would work. Can you take a little time to explain your suggestion?
|
|
Ee Maculate
Owner of Fourmile Castle
Join date: 11 Jan 2007
Posts: 919
|
06-15-2009 08:13
I just like the way that llWater returns a float 
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
06-15-2009 09:48
From: Mr Bellingshausen I am not seeing how that would work. Can you take a little time to explain your suggestion? Voids code is getting the current position and comparing the height against the water level. The "//-- move up" comment is where you would add code if you were below the water line..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|