Bret Hornet
Registered User
Join date: 6 Jun 2005
Posts: 29
|
06-13-2005 21:28
edit: looks like you just use .x, .y, and .z... I've got to read the wiki closer.
Is there a way to turn a vector or a rotation type into a string so it can be sent to another prim? Putting it directly in llSay causes a type mismatch. Is there anyway to read the individual elements of a vector and convert them to a string? Is there a better way to send non-string data between objects?
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-13-2005 21:46
_____________________
 Seagel Neville 
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
06-13-2005 22:01
Sounds like it, Just use (type here) before the variable name to typecast it. vector like_so = <0,0,1>;
llSay(0,(string)like_so);
_____________________
---
|
Kyrah Abattoir
cruelty delight
Join date: 4 Jun 2004
Posts: 2,786
|
06-14-2005 01:49
sound like another monster ship builder ^^
_____________________
 tired of XStreetSL? try those! apez http://tinyurl.com/yfm9d5b metalife http://tinyurl.com/yzm3yvw metaverse exchange http://tinyurl.com/yzh7j4a slapt http://tinyurl.com/yfqah9u
|
Rhysling Greenacre
Registered User
Join date: 15 Nov 2003
Posts: 132
|
06-14-2005 17:56
does
vector xyz = (vector)"<1,2,3>";
unstring it?
|
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
|
06-14-2005 18:14
From: Rhysling Greenacre does vector xyz = (vector)"<1,2,3>"; unstring it? Yes, that will convert a string back to a vector, but remember, if you do this: vector foo = <1,2,3>; string bar = (string)foo; Then "foo" will still be a vector, <1,2,3>. (I'm pretty sure you're not trying to do this, but I just wanted to make sure.)
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-14-2005 20:29
if accuracy is a must (you need more then 6 decimal places) then you will want to encode or encapsulate the floats.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|