Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

a bit simpler!

Boris Eebus
Registered User
Join date: 8 Feb 2008
Posts: 45
05-08-2008 17:22
how do I set a label to the xyz cxo-ordinate?


I assume I use llGetPos()
then llToString()
then llSetText()

just having trouble getting it right!
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
05-08-2008 19:04
easier:
.
.
.

vector myVector = llGetPos();
string myString = (string)myVector;

llSetText(myString,myColor,1.0);
.
.
.
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
05-08-2008 19:35
Just wondering would

myvector = llGetPos();
llSetText((string)myvector, <1,1,1>,0);


work? I know (string) works with integers and floats and such, but vectors?
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
05-08-2008 20:06
Sure - you could just do this...

llSetText ((string)llGetPos(), <1.0, 1.0, 1.0>, 1.0);
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
05-08-2008 21:19
From: Keira Wells
I know (string) works with integers and floats and such, but vectors?

Yes. Generally a vector or rotation converted to a string will look like you would write a vector or rotation in a script (I think either without spaces or with a single space following each comma; not sure which), and will have I believe six places after the decimal. If you want to change the precision or format in any way you have to do your own string conversion. Likewise you can cast a string to a vector or rotation, in which case it tries to parse it in the same way the LSL compiler would inside a script (or at least close enough for everyday work; I don't know if there might be slight differences).
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
05-08-2008 21:28
In short, anything will cast to a string